diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-07-31 02:12:06 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-08-05 00:06:14 +0300 |
commit | bf65820782a7b67c294587fa6f670bd9c7678b51 (patch) | |
tree | fe83edfdf9ba47eec47a61e88bae8d623f1c0ea7 /source/blender/makesrna/intern/rna_brush.c | |
parent | 6faa765af8954948de3cec75a2261a5aa139b4e5 (diff) |
Sculpt: Cloth brush Pin Simulation Boundary property
The cloth brush has a defined simulated area with a falloff. In the falloff
area (the area between the dashed white circle and the exterior white
circle), simulation properties change in order to fade out the
simulation deformation effects towards the boundary.
With some brushes and stroke types (like anchored strokes with pinching
or grabbing with full strength), it is possible to apply more force than
what the boundary falloff can compensate, so the simulation breaks when
this happens.
This option pins the falloff area with softbody constraints, This
produces a much better deformation falloff and it is no longer possible
to move the vertices near the simulation boundary, so the simulation
won't break no matter the strength of the forces applied inside the
simulated areas.
This is an option as it is particularly useful for some brushes to add
localized details, but for brushes that are supposed to deform the
entire mesh (like the grab brush in D8424), this can add unwanted
softbody constraints that affect the simulation result.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8435
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index f28222d0947..efc712544ca 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -2793,6 +2793,15 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Connected Only", "Affect only topologically connected elements"); RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "use_cloth_pin_simulation_boundary", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag2", BRUSH_CLOTH_PIN_SIMULATION_BOUNDARY); + RNA_def_property_ui_text( + prop, + "Pin Simulation Boundary", + "Lock the position of the vertices in the simulation falloff area to avoid artifacts and " + "create a softer transitionwith with unnafected areas"); + RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "invert_to_scrape_fill", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_INVERT_TO_SCRAPE_FILL); RNA_def_property_ui_text(prop, |