diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-12-10 00:19:34 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-12-10 00:25:16 +0300 |
commit | d870a60dd9270764d5f61457224252200376dd2d (patch) | |
tree | e8a68244c0195b8fb103497bd0284cd25bd50ef3 /source/blender/makesrna/intern/rna_brush.c | |
parent | 19560eef1aedd64fc604c1f6151fa62c5c3c3957 (diff) |
Sculpt: Elastic deform type for Snake Hook
This adds deformation types to snake hook and the elastic deformation
type. This mode deforms the mesh using a kelvinlet instead of applying
the displacement directly inside the brush radius, which is great for
stylized shapes sketching.
Changes in rake rotation when using elastic are too strong when set
to 1, so I'll add a nicer way to support rake rotations with smoother
transitions in the future.
Reviewed By: sergey, JulienKaspar
Differential Revision: https://developer.blender.org/D9560
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index cf36c1a3742..b5ce7976fd8 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -2072,6 +2072,20 @@ static void rna_def_brush(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; + static const EnumPropertyItem brush_snake_hook_deform_type_items[] = { + {BRUSH_SNAKE_HOOK_DEFORM_FALLOFF, + "FALLOFF", + 0, + "Radius Falloff", + "Applies the brush falloff in the tip of the brush"}, + {BRUSH_SNAKE_HOOK_DEFORM_ELASTIC, + "ELASTIC", + 0, + "Elastic", + "Modifies the entire mesh using elastic deform"}, + {0, NULL, 0, NULL, NULL}, + }; + static const EnumPropertyItem brush_cloth_deform_type_items[] = { {BRUSH_CLOTH_DEFORM_DRAG, "DRAG", 0, "Drag", ""}, {BRUSH_CLOTH_DEFORM_PUSH, "PUSH", 0, "Push", ""}, @@ -2309,6 +2323,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, "snake_hook_deform_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, brush_snake_hook_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, "cloth_deform_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, brush_cloth_deform_type_items); RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush"); |