diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-07-11 01:19:45 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-07-13 18:53:24 +0300 |
commit | 2b5e21fe00e861e40339cf3b4c6927c46525d3f6 (patch) | |
tree | b213b85e9e708595177046e5875f12f32647b6ec /source/blender/makesrna | |
parent | 107695220918f07cab51dfe57f8dbcb465ac8466 (diff) |
Sculpt: Add extra deform types to Smear
The smear brush was using the stroke direction to slide colors across
the mesh surface (this is called drag in other sculpt tools). Similarly,
other deformations can be included. The most common ones in image
editing are pinch and expand, which can be used to sharpen transitions
between colors.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8270
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index b139e4609cd..b4703ab9aa2 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1997,6 +1997,13 @@ static void rna_def_brush(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; + static const EnumPropertyItem brush_smear_deform_type_items[] = { + {BRUSH_SMEAR_DEFORM_DRAG, "DRAG", 0, "Drag", ""}, + {BRUSH_SMEAR_DEFORM_PINCH, "PINCH", 0, "Pinch", ""}, + {BRUSH_SMEAR_DEFORM_EXPAND, "EXPAND", 0, "Expand", ""}, + {0, NULL, 0, NULL, NULL}, + }; + srna = RNA_def_struct(brna, "Brush", "ID"); RNA_def_struct_ui_text( srna, "Brush", "Brush data-block for storing brush settings for painting and sculpting"); @@ -2117,6 +2124,11 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush"); RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "smear_deform_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, brush_smear_deform_type_items); + RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush"); + RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "pose_deform_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, brush_pose_deform_type_items); RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush"); |