From 0eee384a8dd26062b6a479d004dcd2554940a14b Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Fri, 23 Oct 2020 01:07:20 +0200 Subject: Sculpt: Option to limit the action of line gestures to the segment This adds a tool property for sculpt line gesture tools (line and project) to limits its effect to the segment of the gesture instead of using the infinite line to bisect the mesh in two parts. To achieve that, the line gesture now has two extra side planes that can be enabled/disabled for getting the nodes from the PBVH and to test the vertices. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9307 --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index b3f4757d10a..a923bb305d9 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1259,6 +1259,7 @@ class _defs_sculpt: def draw_settings(_context, layout, tool): props = tool.operator_properties("paint.mask_line_gesture") layout.prop(props, "use_front_faces_only", expand=False) + layout.prop(props, "use_limit_to_segment", expand=False) return dict( idname="builtin.line_mask", @@ -1331,12 +1332,17 @@ class _defs_sculpt: @ToolDef.from_fn def project_line(): + def draw_settings(_context, layout, tool): + props = tool.operator_properties("sculpt.project_line_gesture") + layout.prop(props, "use_limit_to_segment", expand=False) + return dict( idname="builtin.line_project", label="Line Project", icon="ops.sculpt.line_project", widget=None, keymap=(), + draw_settings=draw_settings, ) @ToolDef.from_fn -- cgit v1.2.3