Sculpt: Cloth Filter

This tool is similar to the cloth brush, but it applies the cloth
simulation deformation to the whole mesh in an uniform way. The
simulation can be controlled using the mask to pin vertices and the face
sets to define force action areas.

It uses the same solver as the cloth brush which now no longer depends
on StrokeCache.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7857
This commit is contained in:
Pablo Dobarro
2020-06-01 22:36:26 +02:00
parent 3778f168f6
commit 1d4bae8566
7 changed files with 342 additions and 29 deletions

View File

@@ -1228,6 +1228,25 @@ class _defs_sculpt:
draw_settings=draw_settings,
)
@ToolDef.from_fn
def cloth_filter():
def draw_settings(_context, layout, tool):
props = tool.operator_properties("sculpt.cloth_filter")
layout.prop(props, "type", expand=False)
layout.prop(props, "strength")
layout.prop(props, "cloth_mass")
layout.prop(props, "cloth_damping")
layout.prop(props, "use_face_sets")
return dict(
idname="builtin.cloth_filter",
label="Cloth Filter",
icon="ops.sculpt.cloth_filter",
widget=None,
keymap=(),
draw_settings=draw_settings,
)
class _defs_vertex_paint:
@@ -2402,6 +2421,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_sculpt.hide_border,
None,
_defs_sculpt.mesh_filter,
_defs_sculpt.cloth_filter,
None,
_defs_transform.translate,
_defs_transform.rotate,