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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-21 11:45:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-21 11:45:41 +0400
commitfae0b2068b2287fdce76116ff5e0503040f5be61 (patch)
tree9e232485fe84e8261402ef26fa5ee66c23c78140 /source/blender/makesrna
parent19e81b12e774d800cff8e5de7b450f65d108a451 (diff)
falloff options for dilate/erode feather compo node.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_enum_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c10
-rw-r--r--source/blender/makesrna/intern/rna_scene.c10
3 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 473ab7485b0..a8d176db767 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -41,6 +41,7 @@ extern EnumPropertyItem object_mode_items[];
extern EnumPropertyItem metaelem_type_items[];
extern EnumPropertyItem proportional_falloff_items[];
+extern EnumPropertyItem proportional_falloff_curve_only_items[];
extern EnumPropertyItem proportional_editing_items[];
extern EnumPropertyItem snap_target_items[];
extern EnumPropertyItem snap_element_items[];
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index ef3dac5a221..51bd778d543 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2068,11 +2068,21 @@ static void def_cmp_dilate_erode(StructRNA *srna)
RNA_def_property_ui_text(prop, "Distance", "Distance to grow/shrink (number of iterations)");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+ /* CMP_NODE_DILATEERODE_DISTANCE_THRESH only */
prop = RNA_def_property(srna, "edge", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom3");
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Edge", "Edge to inset");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+
+ RNA_def_struct_sdna_from(srna, "NodeDilateErode", "storage");
+
+ /* CMP_NODE_DILATEERODE_DISTANCE_FEATHER only */
+ prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "falloff");
+ RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items);
+ RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
static void def_cmp_scale(StructRNA *srna)
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 85c7b5679c1..072df099cea 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -101,6 +101,16 @@ EnumPropertyItem proportional_falloff_items[] = {
{0, NULL, 0, NULL, NULL}
};
+/* subset of the enum - only curves, missing random and const */
+EnumPropertyItem proportional_falloff_curve_only_items[] = {
+ {PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"},
+ {PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"},
+ {PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"},
+ {PROP_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", "Sharp falloff"},
+ {PROP_LIN, "LINEAR", ICON_LINCURVE, "Linear", "Linear falloff"},
+ {0, NULL, 0, NULL, NULL}
+};
+
EnumPropertyItem proportional_editing_items[] = {
{PROP_EDIT_OFF, "DISABLED", ICON_PROP_OFF, "Disable", "Proportional Editing disabled"},