Sculpt: Union and Join mode for trim tools
This enables a union boolean mode for the trimming gestures tools which adds geometry to the mesh instead of cutting it. It also adds a Join mode, which adds the geometry directly without using a boolean operation. Depending if you plan to use dyntopo or not, it is useful to have both options available. This is using the full depth of the object from the camera view for the depth of the geometry, but options for controlling the trimming depth in all modes are going to be added in later patches Reviewed By: mont29 Differential Revision: https://developer.blender.org/D9066
This commit is contained in:
@@ -1304,22 +1304,30 @@ class _defs_sculpt:
|
||||
|
||||
@ToolDef.from_fn
|
||||
def trim_box():
|
||||
def draw_settings(_context, layout, tool):
|
||||
props = tool.operator_properties("sculpt.trim_box_gesture")
|
||||
layout.prop(props, "trim_mode", expand=False)
|
||||
return dict(
|
||||
idname="builtin.box_trim",
|
||||
label="Box Trim",
|
||||
icon="ops.sculpt.box_trim",
|
||||
widget=None,
|
||||
keymap=(),
|
||||
draw_settings=draw_settings,
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def trim_lasso():
|
||||
def draw_settings(_context, layout, tool):
|
||||
props = tool.operator_properties("sculpt.trim_lasso_gesture")
|
||||
layout.prop(props, "trim_mode", expand=False)
|
||||
return dict(
|
||||
idname="builtin.lasso_trim",
|
||||
label="Lasso Trim",
|
||||
icon="ops.sculpt.lasso_trim",
|
||||
widget=None,
|
||||
keymap=(),
|
||||
draw_settings=draw_settings,
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
||||
Reference in New Issue
Block a user