diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2021-03-12 23:35:56 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2021-03-12 23:37:12 +0300 |
commit | 74052a9f02a1f891300bb1e36b98556c5f7820b2 (patch) | |
tree | 3311ec539dd3c348dca5c51f3e18c892f4a27fef /release/scripts | |
parent | 9d08c169d1d540553f879afaecf7f06965a81469 (diff) |
Sculpt: Mask Init operator
This operator initializes mask values for the entire mesh. It supports
different modes for initializing those values, and more will be added in
the future.
The initial version supports generating a random mask per vertex, Face
Sets or loose parts. These masks are useful for introducing variations
in the model using the filters (both shapes and colors).
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10679
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 19bf0662885..e393ddf16d6 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3121,6 +3121,11 @@ class VIEW3D_MT_mask(Menu): props = layout.operator("sculpt.dirty_mask", text='Dirty Mask') + layout.separator() + + layout.menu("VIEW3D_MT_random_mask", text="Random Mask") + + class VIEW3D_MT_face_sets(Menu): bl_label = "Face Sets" @@ -3222,6 +3227,21 @@ class VIEW3D_MT_face_sets_init(Menu): op.mode = 'FACE_MAPS' +class VIEW3D_MT_random_mask(Menu): + bl_label = "Random Mask" + + def draw(self, _context): + layout = self.layout + + op = layout.operator("sculpt.mask_init", text='Per Vertex') + op.mode = 'RANDOM_PER_VERTEX' + + op = layout.operator("sculpt.mask_init", text='Per Face Set') + op.mode = 'RANDOM_PER_FACE_SET' + + op = layout.operator("sculpt.mask_init", text='Per Loose Part') + op.mode = 'RANDOM_PER_LOOSE_PART' + class VIEW3D_MT_particle(Menu): bl_label = "Particle" @@ -7563,6 +7583,7 @@ classes = ( VIEW3D_MT_mask, VIEW3D_MT_face_sets, VIEW3D_MT_face_sets_init, + VIEW3D_MT_random_mask, VIEW3D_MT_particle, VIEW3D_MT_particle_context_menu, VIEW3D_MT_particle_showhide, |