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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user