diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-12-16 08:44:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-12-16 08:48:51 +0300 |
commit | f3dadd4115eeb19858a3f6c81765b4e412ad1f7d (patch) | |
tree | e1993ad1ba5cbcbb57fd891261bfe40a63432dbc /release/scripts/startup/bl_ui/space_image.py | |
parent | e720661b7d4a320c32a3db3b0082454c42d576f2 (diff) |
UI: de-duplicate mask context menu
- Use the clip mask context menu for the image editor.
- Remove redundant CLIP_MT_mask_handle_type_menu.
- Remove "Add" items (was only in image mask context menu)
as the convention is not to include these in the context menu.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_image.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 3b70110e182..c795b575a88 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -778,44 +778,13 @@ class IMAGE_MT_mask_context_menu(Menu): @classmethod def poll(cls, context): sima = context.space_data - return (sima.show_maskedit) + return sima.show_maskedit def draw(self, context): layout = self.layout - sima = context.space_data - - if not sima.mask: - layout.operator("mask.new") - layout.separator() - layout.operator("mask.primitive_circle_add", icon='MESH_CIRCLE') - layout.operator("mask.primitive_square_add", icon='MESH_PLANE') - else: - layout.operator_menu_enum("mask.handle_type_set", "type") - layout.operator("mask.switch_direction") - layout.operator("mask.cyclic_toggle") - - layout.separator() - layout.operator("mask.primitive_circle_add", icon='MESH_CIRCLE') - layout.operator("mask.primitive_square_add", icon='MESH_PLANE') - - layout.separator() - layout.operator("mask.copy_splines", icon='COPYDOWN') - layout.operator("mask.paste_splines", icon='PASTEDOWN') - - layout.separator() - - layout.operator("mask.shape_key_rekey", text="Re-key Shape Points") - layout.operator("mask.feather_weight_clear") - layout.operator("mask.shape_key_feather_reset", text="Reset Feather Animation") - - layout.separator() - - layout.operator("mask.parent_set") - layout.operator("mask.parent_clear") - - layout.separator() + from .properties_mask_common import draw_mask_context_menu + draw_mask_context_menu(layout, context) - layout.operator("mask.delete") # ----------------------------------------------------------------------------- # Mask (similar code in space_clip.py, keep in sync) |