diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-22 10:08:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-22 10:08:19 +0300 |
commit | 91b768ccb1f42461668cea61fd1d72d64ab1d14a (patch) | |
tree | 9e4a6238765b9b4c77a1b8d00185a70dbef3e5c9 /release | |
parent | 827207b08ee4077f313d29dafa0bc96ea10c2c67 (diff) |
UI: remove mask toolbar, use menus instead
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_mask_common.py | 56 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_clip.py | 14 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 17 |
3 files changed, 7 insertions, 80 deletions
diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index ad78685d7ff..4d502cf3c46 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -258,62 +258,14 @@ class MASK_PT_transforms: col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN' -class MASK_PT_tools: - # subclasses must define... - # ~ bl_space_type = 'CLIP_EDITOR' - # ~ bl_region_type = 'TOOLS' - bl_label = "Mask Tools" - bl_category = "Mask" - - @classmethod - def poll(cls, context): - space_data = context.space_data - return space_data.mask and space_data.mode == 'MASK' - - def draw(self, context): - layout = self.layout - - col = layout.column(align=True) - col.label(text="Spline:") - col.operator("mask.delete") - col.operator("mask.cyclic_toggle") - col.operator("mask.switch_direction") - col.operator("mask.handle_type_set") - col.operator("mask.feather_weight_clear") - - col = layout.column(align=True) - col.label(text="Parenting:") - row = col.row(align=True) - row.operator("mask.parent_set", text="Parent") - row.operator("mask.parent_clear", text="Clear") - - col = layout.column(align=True) - col.label(text="Animation:") - row = col.row(align=True) - row.operator("mask.shape_key_insert", text="Insert Key") - row.operator("mask.shape_key_clear", text="Clear Key") - col.operator("mask.shape_key_feather_reset", text="Reset Feather Animation") - col.operator("mask.shape_key_rekey", text="Re-Key Shape Points") - - -class MASK_PT_add: - # subclasses must define... - # ~ bl_space_type = 'CLIP_EDITOR' - # ~ bl_region_type = 'TOOLS' +class MASK_MT_add(Menu): bl_label = "Add" - bl_category = "Mask" - - @classmethod - def poll(cls, context): - space_data = context.space_data - return space_data.mode == 'MASK' def draw(self, context): layout = self.layout - col = layout.column(align=True) - col.operator("mask.primitive_circle_add", icon='MESH_CIRCLE') - col.operator("mask.primitive_square_add", icon='MESH_PLANE') + layout.operator("mask.primitive_circle_add", icon='MESH_CIRCLE') + layout.operator("mask.primitive_square_add", icon='MESH_PLANE') class MASK_MT_mask(Menu): @@ -328,6 +280,7 @@ class MASK_MT_mask(Menu): layout.operator("mask.cyclic_toggle") layout.operator("mask.switch_direction") layout.operator("mask.normals_make_consistent") + layout.operator("mask.handle_type_set") layout.operator("mask.feather_weight_clear") # TODO, better place? layout.separator() @@ -406,6 +359,7 @@ class MASK_MT_select(Menu): classes = ( MASK_UL_layers, + MASK_MT_add, MASK_MT_mask, MASK_MT_visibility, MASK_MT_transform, diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index e92eade758c..0df3f2ed85c 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -320,6 +320,7 @@ class CLIP_MT_masking_editor_menus(Menu): if clip: layout.menu("MASK_MT_select") layout.menu("CLIP_MT_clip") # XXX - remove? + layout.menu("MASK_MT_add") layout.menu("MASK_MT_mask") else: layout.menu("CLIP_MT_clip") # XXX - remove? @@ -1121,9 +1122,7 @@ from .properties_mask_common import ( MASK_PT_spline, MASK_PT_point, MASK_PT_display, - MASK_PT_tools, MASK_PT_transforms, - MASK_PT_add, ) @@ -1152,20 +1151,11 @@ class CLIP_PT_mask(MASK_PT_mask, Panel): bl_region_type = 'UI' -class CLIP_PT_tools_mask_add(MASK_PT_add, Panel): - bl_space_type = 'CLIP_EDITOR' - bl_region_type = 'TOOLS' - - class CLIP_PT_tools_mask_transforms(MASK_PT_transforms, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'TOOLS' -class CLIP_PT_tools_mask(MASK_PT_tools, Panel): - bl_space_type = 'CLIP_EDITOR' - bl_region_type = 'TOOLS' - # --- end mask --- @@ -1553,8 +1543,6 @@ classes = ( CLIP_PT_mask_display, CLIP_PT_active_mask_spline, CLIP_PT_active_mask_point, - CLIP_PT_tools_mask, - CLIP_PT_tools_mask_add, CLIP_PT_tools_mask_transforms, CLIP_PT_footage, CLIP_PT_tools_scenesetup, diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 1a9b8ab83b1..67cdd9d8938 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -646,6 +646,7 @@ class MASK_MT_editor_menus(Menu): if show_uvedit: layout.menu("IMAGE_MT_uvs") if show_maskedit: + layout.menu("MASK_MT_add") layout.menu("MASK_MT_mask") @@ -659,8 +660,6 @@ from .properties_mask_common import ( MASK_PT_spline, MASK_PT_point, MASK_PT_display, - MASK_PT_tools, - MASK_PT_add, ) @@ -689,18 +688,6 @@ class IMAGE_PT_active_mask_point(MASK_PT_point, Panel): bl_region_type = 'UI' -class IMAGE_PT_tools_mask(MASK_PT_tools, Panel): - bl_space_type = 'IMAGE_EDITOR' - bl_region_type = 'TOOLS' - bl_category = 'Mask' - - -class IMAGE_PT_tools_mask_add(MASK_PT_add, Panel): - bl_space_type = 'IMAGE_EDITOR' - bl_region_type = 'TOOLS' - bl_category = 'Mask' - - # --- end mask --- @@ -1381,7 +1368,6 @@ classes = ( IMAGE_HT_header, MASK_MT_editor_menus, IMAGE_PT_mask, - IMAGE_PT_tools_mask_add, IMAGE_PT_mask_layers, IMAGE_PT_mask_display, IMAGE_PT_active_mask_spline, @@ -1395,7 +1381,6 @@ classes = ( IMAGE_PT_paint, IMAGE_PT_tools_brush_overlay, IMAGE_PT_tools_brush_texture, - IMAGE_PT_tools_mask, IMAGE_PT_tools_mask_texture, IMAGE_PT_tools_brush_tool, IMAGE_PT_paint_stroke, |