diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 11:45:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 11:45:41 +0400 |
commit | fae0b2068b2287fdce76116ff5e0503040f5be61 (patch) | |
tree | 9e232485fe84e8261402ef26fa5ee66c23c78140 /source/blender/makesrna/intern | |
parent | 19e81b12e774d800cff8e5de7b450f65d108a451 (diff) |
falloff options for dilate/erode feather compo node.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 10 |
2 files changed, 20 insertions, 0 deletions
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"}, |