Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-09-23 13:10:31 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-09-24 13:57:59 +0300
commit969cbed49b027b8eb05f2f1606f684a6acf4b7af (patch)
treee639be8576471ea06a33ef8b7275310ff99a128d /source/blender/makesrna
parent2721700b7ad07ca8de55f2d270dec3e64f4b12a6 (diff)
Add support for a one-dimensional Force Field source shape.
The fields currently support a Point source and a two-dimensional Plane source, but there is no way to create a field that pulls toward or from a line in space other than using the Texture field type. This adds a new simple shape option to do that. The line is aligned along the Z axis so that it works meaningfully with the Tube and Cone falloff modes. Reviewers: brecht, mont29, LucaRood Differential Revision: https://developer.blender.org/D3721
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 97f1985b48b..2f1527651e6 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -42,10 +42,11 @@
#include "WM_types.h"
static const EnumPropertyItem effector_shape_items[] = {
- {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
- {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
- {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", ""},
- {PFIELD_SHAPE_POINTS, "POINTS", 0, "Every Point", ""},
+ {PFIELD_SHAPE_POINT, "POINT", 0, "Point", "Field originates from the object center"},
+ {PFIELD_SHAPE_LINE, "LINE", 0, "Line", "Field originates from the local Z axis of the object"},
+ {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", "Field originates from the local XY plane of the object"},
+ {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", "Field originates from the surface of the object"},
+ {PFIELD_SHAPE_POINTS, "POINTS", 0, "Every Point", "Field originates from all of the vertices of the object"},
{0, NULL, 0, NULL, NULL}
};
@@ -56,15 +57,17 @@ static const EnumPropertyItem effector_shape_items[] = {
/* type specific return values only used from functions */
static const EnumPropertyItem curve_shape_items[] = {
- {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
- {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
- {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve", ""},
+ {PFIELD_SHAPE_POINT, "POINT", 0, "Point", "Field originates from the object center"},
+ {PFIELD_SHAPE_LINE, "LINE", 0, "Line", "Field originates from the local Z axis of the object"},
+ {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", "Field originates from the local XY plane of the object"},
+ {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve", "Field originates from the curve itself"},
{0, NULL, 0, NULL, NULL}
};
static const EnumPropertyItem empty_shape_items[] = {
- {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
- {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
+ {PFIELD_SHAPE_POINT, "POINT", 0, "Point", "Field originates from the object center"},
+ {PFIELD_SHAPE_LINE, "LINE", 0, "Line", "Field originates from the local Z axis of the object"},
+ {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", "Field originates from the local XY plane of the object"},
{0, NULL, 0, NULL, NULL}
};