diff options
author | Pablo Dobarro <pablodp606> | 2022-06-04 05:21:04 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-06-04 23:50:28 +0300 |
commit | e90ba74d3eb826abab4ec65b82fe0176ce3b7d1b (patch) | |
tree | 10f0d095e4aae8c50614b65ba2b71af4bc013002 /release/scripts/startup | |
parent | e230ccaf8c3b62f8c1a322d525084226136578ba (diff) |
D15041: Sculpt: Elastic Transform
This implements transform modes for the transform tool and Elastic
Transform. This mode uses the Kelvinlets from elastic deform to apply
the transformation to the mesh, using the cursor radius to control the
elasticity falloff.
{F9269771}
In order for this to work, the transform tool uses incremental mode when
elastic transform is enabled. This allows to integrate the displacement of
the Kelvinet in multiple steps.
Review By: Sergey Sharbin & Daniel Bystedt & Julian Kaspar & Campbell
Barton
Differential Revision: https://developer.blender.org/D9653
Ref D15041
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 31f25d016a6..5831aa52cc1 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -261,9 +261,15 @@ class _defs_annotate: class _defs_transform: + def draw_transform_sculpt_tool_settings(context, layout): + if context.mode != 'SCULPT': + return + layout.prop(context.tool_settings.sculpt, "transform_mode") + @ToolDef.from_fn def translate(): def draw_settings(context, layout, _tool): + _defs_transform.draw_transform_sculpt_tool_settings(context, layout) _template_widget.VIEW3D_GGT_xform_gizmo.draw_settings_with_index(context, layout, 1) return dict( idname="builtin.move", @@ -279,6 +285,7 @@ class _defs_transform: @ToolDef.from_fn def rotate(): def draw_settings(context, layout, _tool): + _defs_transform.draw_transform_sculpt_tool_settings(context, layout) _template_widget.VIEW3D_GGT_xform_gizmo.draw_settings_with_index(context, layout, 2) return dict( idname="builtin.rotate", @@ -294,6 +301,7 @@ class _defs_transform: @ToolDef.from_fn def scale(): def draw_settings(context, layout, _tool): + _defs_transform.draw_transform_sculpt_tool_settings(context, layout) _template_widget.VIEW3D_GGT_xform_gizmo.draw_settings_with_index(context, layout, 3) return dict( idname="builtin.scale", @@ -349,6 +357,7 @@ class _defs_transform: props = tool.gizmo_group_properties("VIEW3D_GGT_xform_gizmo") layout.prop(props, "drag_action") + _defs_transform.draw_transform_sculpt_tool_settings(context, layout) _template_widget.VIEW3D_GGT_xform_gizmo.draw_settings_with_index(context, layout, 1) return dict( |