Tool System: add sculpt mask lasso tool

This commit is contained in:
Campbell Barton 2019-06-07 16:04:12 +10:00
parent a5c4dd6b33
commit 9337ba7fa6
Notes: blender-bot 2024-03-22 15:57:27 +01:00
Referenced by issue #55036, Tool System Todo
2 changed files with 25 additions and 0 deletions

View File

@ -5549,6 +5549,19 @@ def km_3d_view_tool_sculpt_box_mask(params):
)
def km_3d_view_tool_sculpt_lasso_mask(params):
return (
"3D View Tool: Sculpt, Lasso Mask",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
{"items": [
("paint.mask_lasso_gesture", {"type": params.tool_tweak, "value": 'ANY'},
{"properties": [("value", 1.0)]}),
("paint.mask_lasso_gesture", {"type": params.tool_tweak, "value": 'ANY', "ctrl": True},
{"properties": [("value", 0.0)]}),
]},
)
def km_3d_view_tool_paint_weight_sample_weight(params):
return (
"3D View Tool: Paint Weight, Sample Weight",
@ -5984,6 +5997,7 @@ def generate_keymaps(params=None):
km_3d_view_tool_edit_curve_extrude_cursor(params),
km_3d_view_tool_sculpt_box_hide(params),
km_3d_view_tool_sculpt_box_mask(params),
km_3d_view_tool_sculpt_lasso_mask(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),

View File

@ -971,6 +971,16 @@ class _defs_sculpt:
keymap=(),
)
@ToolDef.from_fn
def mask_lasso():
return dict(
idname="builtin.lasso_mask",
label="Lasso Mask",
icon="none",
widget=None,
keymap=(),
)
class _defs_vertex_paint:
@ -1899,6 +1909,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
None,
_defs_sculpt.hide_border,
_defs_sculpt.mask_border,
_defs_sculpt.mask_lasso,
None,
*_tools_annotate,
],