Sculpt: Face Set Edit Operator

This operator performs an edit operation in the active face set defined
by the cursor position and updates the visibility. For now, it has a
Grow and Shrink operations, similar to Select More/Less in edit mode or
to the mask filter Grow/Shrink modes. More operations can be added in
the future.

In multires, this updates the visibility of an entire face from the base
mesh at once, which makes it very convenient to edit the visible area
without manipulating the face set directly.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7367
This commit is contained in:
2020-06-04 00:23:29 +02:00
parent 77789a1904
commit cb9de95d61
6 changed files with 183 additions and 0 deletions

View File

@@ -4318,6 +4318,10 @@ def km_sculpt(params):
{"properties": [("mode", 'SHOW_ALL')]}),
("sculpt.mask_expand", {"type": 'W', "value": 'PRESS', "shift": True},
{"properties": [("use_normals", False), ("keep_previous_mask", False), ("invert", False), ("smooth_iterations", 0), ("create_face_set", True)]}),
("sculpt.face_set_edit", {"type": 'W', "value": 'PRESS', "ctrl": True},
{"properties": [("mode", "GROW")]}),
("sculpt.face_set_edit", {"type": 'W', "value": 'PRESS', "ctrl": True, "alt": True},
{"properties": [("mode", "SHRINK")]}),
# Subdivision levels
*_template_items_object_subdivision_set(),
("object.subdivision_set", {"type": 'PAGE_UP', "value": 'PRESS'},

View File

@@ -3126,6 +3126,14 @@ class VIEW3D_MT_face_sets(Menu):
layout.separator()
op = layout.operator("sculpt.face_set_edit", text='Grow Face Set')
op.mode = 'GROW'
op = layout.operator("sculpt.face_set_edit", text='Shrink Face Set')
op.mode = 'SHRINK'
layout.separator()
op = layout.operator("sculpt.face_set_change_visibility", text='Invert Visible Face Sets')
op.mode = 'INVERT'