From 1d4bae856690c7a4603789509a5842dd6b5f8be1 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 1 Jun 2020 22:36:26 +0200 Subject: 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 --- .../presets/keyconfig/keymap_data/blender_default.py | 11 +++++++++++ .../startup/bl_ui/space_toolsystem_toolbar.py | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) (limited to 'release') diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 0db7b79d8c9..08e81d89c4f 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -6272,6 +6272,16 @@ def km_3d_view_tool_sculpt_mesh_filter(params): ]}, ) +def km_3d_view_tool_sculpt_cloth_filter(params): + return ( + "3D View Tool: Sculpt, Cloth Filter", + {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, + {"items": [ + ("sculpt.cloth_filter", {"type": params.tool_tweak, "value": 'ANY'}, + None) + ]}, + ) + def km_3d_view_tool_paint_weight_sample_weight(params): return ( "3D View Tool: Paint Weight, Sample Weight", @@ -6811,6 +6821,7 @@ def generate_keymaps(params=None): km_3d_view_tool_sculpt_box_mask(params), km_3d_view_tool_sculpt_lasso_mask(params), km_3d_view_tool_sculpt_mesh_filter(params), + km_3d_view_tool_sculpt_cloth_filter(params), km_3d_view_tool_paint_weight_sample_weight(params), km_3d_view_tool_paint_weight_sample_vertex_group(params), km_3d_view_tool_paint_weight_gradient(params), diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 1aa5dde168b..b4c1ea5163f 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -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, -- cgit v1.2.3