diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-03-22 01:24:53 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-03-26 18:20:24 +0300 |
commit | 99530ef4ed70a479523d8e99a40fce24eb9ba658 (patch) | |
tree | bc5bc1b2537f7c87ea01f1315a233fe3ae2b32cf /release/scripts/startup | |
parent | a218be308032ac4c270950f450bc7a5e05f066ce (diff) |
Sculpt: Face Sets Init operator
This operator initializes all face sets in the sculpt at once using
different mesh properties. It can create face sets by mesh connectivity,
material slots, face normals, UV seams, creases, sharp edges, bevel
weights and face maps.
For properties that are already in the faces, this is implemented as a
loop. Properties that depend on edge attributes use a similar operation
to sculpt flood fill, but using face adjacency instead of edge vertex
connectivity.
As Multires also stores the face sets in the base mesh, this should work
in the face sets Multires implementation without any changes.
This is implemented as a separate operator as this resets the visibility
and creates all face sets at once, while the create face set operator
creates a single face sets, leaving the rest of the face sets in the
mesh as they are.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D7209
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 4f4272c879a..db128c14cf9 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3136,6 +3136,10 @@ class VIEW3D_MT_face_sets(Menu): op.mode = 'VISIBLE' layout.separator() + + layout.menu("VIEW3D_MT_face_sets_init", text="Init Face Sets") + + layout.separator() op = layout.operator("sculpt.face_set_change_visibility", text='Invert Visible Face Sets') op.mode = 'INVERT' @@ -3169,6 +3173,37 @@ class VIEW3D_MT_sculpt_set_pivot(Menu): props = layout.operator("sculpt.set_pivot_position", text="Pivot to Surface Under Cursor") props.mode = 'SURFACE' +class VIEW3D_MT_face_sets_init(Menu): + bl_label = "Face Sets Init" + + def draw(self, _context): + layout = self.layout + + op = layout.operator("sculpt.face_sets_init", text='By Loose Parts') + op.mode = 'LOOSE_PARTS' + + op = layout.operator("sculpt.face_sets_init", text='By Materials') + op.mode = 'MATERIALS' + + op = layout.operator("sculpt.face_sets_init", text='By Normals') + op.mode = 'NORMALS' + + op = layout.operator("sculpt.face_sets_init", text='By UV Seams') + op.mode = 'UV_SEAMS' + + op = layout.operator("sculpt.face_sets_init", text='By Edge Creases') + op.mode = 'CREASES' + + op = layout.operator("sculpt.face_sets_init", text='By Edge Bevel Weight') + op.mode = 'BEVEL_WEIGHT' + + op = layout.operator("sculpt.face_sets_init", text='By Sharp Edges') + op.mode = 'SHARP_EDGES' + + op = layout.operator("sculpt.face_sets_init", text='By Face Maps') + op.mode = 'FACE_MAPS' + + class VIEW3D_MT_particle(Menu): bl_label = "Particle" @@ -7335,6 +7370,7 @@ classes = ( VIEW3D_MT_sculpt_set_pivot, VIEW3D_MT_mask, VIEW3D_MT_face_sets, + VIEW3D_MT_face_sets_init, VIEW3D_MT_particle, VIEW3D_MT_particle_context_menu, VIEW3D_MT_particle_showhide, |