Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-08-11 20:24:01 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-08-12 19:09:27 +0300
commit77e40708c2ce91cfa27930a0250c5602ec0e93ec (patch)
treed375d9f33d6651046b5d511927e9479dcae4d6cd /release
parent051f067fb85092ba6d1098e7396bbaf742b8afe1 (diff)
Sculpt: Expose Edit Face Set as a tool
Previously the way to use this operations was using the shortcut Ctrl + W and Ctrl + Alt + W, which was not very discoverable and it was limiting the amount of options that can be added to the operator.Now the same functionality of the operator is available as a tool, which will make easier to add other editing operations and options without adding more entries to the keymap. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8545
Diffstat (limited to 'release')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py13
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py18
2 files changed, 31 insertions, 0 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 80ebff8982f..6556c2f34e0 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -6347,6 +6347,18 @@ def km_3d_view_tool_sculpt_mask_by_color(params):
]},
)
+def km_3d_view_tool_sculpt_face_set_edit(params):
+ return (
+ "3D View Tool: Sculpt, Face Set Edit",
+ {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
+ {"items": [
+ ("sculpt.face_set_edit", {"type": params.tool_mouse, "value": 'ANY'},
+ None),
+ ("sculpt.face_set_edit", {"type": params.tool_tweak, "value": 'ANY'},
+ None)
+ ]},
+ )
+
def km_3d_view_tool_paint_weight_sample_weight(params):
return (
"3D View Tool: Paint Weight, Sample Weight",
@@ -6890,6 +6902,7 @@ def generate_keymaps(params=None):
km_3d_view_tool_sculpt_cloth_filter(params),
km_3d_view_tool_sculpt_color_filter(params),
km_3d_view_tool_sculpt_mask_by_color(params),
+ km_3d_view_tool_sculpt_face_set_edit(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),
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index ae144d9e8d0..38879d41a64 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1335,6 +1335,22 @@ class _defs_sculpt:
draw_settings=draw_settings,
)
+ @ToolDef.from_fn
+ def face_set_edit():
+ def draw_settings(_context, layout, tool):
+ props = tool.operator_properties("sculpt.face_set_edit")
+ layout.prop(props, "mode", expand=False)
+ layout.prop(props, "modify_hidden")
+
+ return dict(
+ idname="builtin.face_set_edit",
+ label="Edit Face Set",
+ icon="ops.sculpt.face_set_edit",
+ widget=None,
+ keymap="3D View Tool: Sculpt, Face Set Edit",
+ draw_settings=draw_settings,
+ )
+
class _defs_vertex_paint:
@@ -2595,6 +2611,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
else ()
),
None,
+ _defs_sculpt.face_set_edit,
+ None,
_defs_transform.translate,
_defs_transform.rotate,
_defs_transform.scale,