diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-09 17:20:40 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-09 17:30:12 +0300 |
commit | 13206a6dc04eaf6f4b5eea28c135df842f43542b (patch) | |
tree | 2cca9338972c2051c69926dc23d2e27f92f37a06 /release | |
parent | 87c7135da5dbc2df058e433b9df98de454806268 (diff) |
Sculpt: Mask Filter and Dirty Mask generator
The mask filter operator modifies the whole paint mask. In includes multiple operations like smooth, grow or contrast accessible from a pie menu.
The dirty mask generator is similar to Dirty Vertex Colors, but it generates a paint mask. It can be used to mask cavities in the sculpt.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5496
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 61 |
2 files changed, 62 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 6d4c3616ca4..328edf3a1fb 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -3900,6 +3900,7 @@ def km_sculpt(params): {"properties": [("data_path", 'tool_settings.sculpt.brush.use_smooth_stroke')]}), op_menu("VIEW3D_MT_angle_control", {"type": 'R', "value": 'PRESS'}), op_panel("VIEW3D_PT_sculpt_context_menu", params.context_menu_event), + op_menu_pie("VIEW3D_MT_sculpt_mask_edit_pie", {"type" : 'A', "value": 'PRESS'}) ]) if params.legacy: diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 69fa5bc8f4b..5351fe07ed3 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2845,6 +2845,36 @@ class VIEW3D_MT_sculpt(Menu): props = layout.operator("view3d.select_box", text="Box Mask") props = layout.operator("paint.mask_lasso_gesture", text="Lasso Mask") + layout.separator() + + props = layout.operator("sculpt.mask_filter", text='Smooth Mask') + props.filter_type = 'SMOOTH' + props.auto_iteration_count = True; + + props = layout.operator("sculpt.mask_filter", text='Sharpen Mask') + props.filter_type = 'SHARPEN' + props.auto_iteration_count = True; + + props = layout.operator("sculpt.mask_filter", text='Grow Mask') + props.filter_type = 'GROW' + props.auto_iteration_count = True; + + props = layout.operator("sculpt.mask_filter", text='Shrink Mask') + props.filter_type = 'SHRINK' + props.auto_iteration_count = True; + + props = layout.operator("sculpt.mask_filter", text='Increase Contrast') + props.filter_type = 'CONTRAST_INCREASE' + props.auto_iteration_count = False; + + props = layout.operator("sculpt.mask_filter", text='Decrease Contrast') + props.filter_type = 'CONTRAST_DECREASE' + props.auto_iteration_count = False; + + layout.separator() + + props = layout.operator("sculpt.dirty_mask", text='Dirty Mask') + class VIEW3D_MT_particle(Menu): bl_label = "Particle" @@ -4783,6 +4813,36 @@ class VIEW3D_MT_proportional_editing_falloff_pie(Menu): pie.prop(tool_settings, "proportional_edit_falloff", expand=True) +class VIEW3D_MT_sculpt_mask_edit_pie(Menu): + bl_label = "Mask Edit" + + def draw(self, _context): + layout = self.layout + pie = layout.menu_pie() + + op = pie.operator("paint.mask_flood_fill", text='Invert Mask') + op.mode = 'INVERT' + op = pie.operator("paint.mask_flood_fill", text='Clear Mask') + op.mode = 'VALUE' + op = pie.operator("sculpt.mask_filter", text='Smooth Mask') + op.filter_type = 'SMOOTH' + op.auto_iteration_count = True; + op = pie.operator("sculpt.mask_filter", text='Sharpen Mask') + op.filter_type = 'SHARPEN' + op.auto_iteration_count = True; + op = pie.operator("sculpt.mask_filter", text='Grow Mask') + op.filter_type = 'GROW' + op.auto_iteration_count = True; + op = pie.operator("sculpt.mask_filter", text='Shrink Mask') + op.filter_type = 'SHRINK' + op.auto_iteration_count = True; + op = pie.operator("sculpt.mask_filter", text='Increase Contrast') + op.filter_type = 'CONTRAST_INCREASE' + op.auto_iteration_count = False; + op = pie.operator("sculpt.mask_filter", text='Decrease Contrast') + op.filter_type = 'CONTRAST_DECREASE' + op.auto_iteration_count = False; + # ********** Panel ********** @@ -6766,6 +6826,7 @@ classes = ( VIEW3D_MT_snap_pie, VIEW3D_MT_orientations_pie, VIEW3D_MT_proportional_editing_falloff_pie, + VIEW3D_MT_sculpt_mask_edit_pie, VIEW3D_PT_active_tool, VIEW3D_PT_active_tool_duplicate, VIEW3D_PT_view3d_properties, |