UI: remove mask toolbar, use menus instead
This commit is contained in:
@@ -258,62 +258,14 @@ class MASK_PT_transforms:
|
|||||||
col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
|
col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
|
||||||
|
|
||||||
|
|
||||||
class MASK_PT_tools:
|
class MASK_MT_add(Menu):
|
||||||
# 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'
|
|
||||||
bl_label = "Add"
|
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):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
col = layout.column(align=True)
|
layout.operator("mask.primitive_circle_add", icon='MESH_CIRCLE')
|
||||||
col.operator("mask.primitive_circle_add", icon='MESH_CIRCLE')
|
layout.operator("mask.primitive_square_add", icon='MESH_PLANE')
|
||||||
col.operator("mask.primitive_square_add", icon='MESH_PLANE')
|
|
||||||
|
|
||||||
|
|
||||||
class MASK_MT_mask(Menu):
|
class MASK_MT_mask(Menu):
|
||||||
@@ -328,6 +280,7 @@ class MASK_MT_mask(Menu):
|
|||||||
layout.operator("mask.cyclic_toggle")
|
layout.operator("mask.cyclic_toggle")
|
||||||
layout.operator("mask.switch_direction")
|
layout.operator("mask.switch_direction")
|
||||||
layout.operator("mask.normals_make_consistent")
|
layout.operator("mask.normals_make_consistent")
|
||||||
|
layout.operator("mask.handle_type_set")
|
||||||
layout.operator("mask.feather_weight_clear") # TODO, better place?
|
layout.operator("mask.feather_weight_clear") # TODO, better place?
|
||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
@@ -406,6 +359,7 @@ class MASK_MT_select(Menu):
|
|||||||
|
|
||||||
classes = (
|
classes = (
|
||||||
MASK_UL_layers,
|
MASK_UL_layers,
|
||||||
|
MASK_MT_add,
|
||||||
MASK_MT_mask,
|
MASK_MT_mask,
|
||||||
MASK_MT_visibility,
|
MASK_MT_visibility,
|
||||||
MASK_MT_transform,
|
MASK_MT_transform,
|
||||||
|
|||||||
@@ -320,6 +320,7 @@ class CLIP_MT_masking_editor_menus(Menu):
|
|||||||
if clip:
|
if clip:
|
||||||
layout.menu("MASK_MT_select")
|
layout.menu("MASK_MT_select")
|
||||||
layout.menu("CLIP_MT_clip") # XXX - remove?
|
layout.menu("CLIP_MT_clip") # XXX - remove?
|
||||||
|
layout.menu("MASK_MT_add")
|
||||||
layout.menu("MASK_MT_mask")
|
layout.menu("MASK_MT_mask")
|
||||||
else:
|
else:
|
||||||
layout.menu("CLIP_MT_clip") # XXX - remove?
|
layout.menu("CLIP_MT_clip") # XXX - remove?
|
||||||
@@ -1121,9 +1122,7 @@ from .properties_mask_common import (
|
|||||||
MASK_PT_spline,
|
MASK_PT_spline,
|
||||||
MASK_PT_point,
|
MASK_PT_point,
|
||||||
MASK_PT_display,
|
MASK_PT_display,
|
||||||
MASK_PT_tools,
|
|
||||||
MASK_PT_transforms,
|
MASK_PT_transforms,
|
||||||
MASK_PT_add,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -1152,20 +1151,11 @@ class CLIP_PT_mask(MASK_PT_mask, Panel):
|
|||||||
bl_region_type = 'UI'
|
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):
|
class CLIP_PT_tools_mask_transforms(MASK_PT_transforms, Panel):
|
||||||
bl_space_type = 'CLIP_EDITOR'
|
bl_space_type = 'CLIP_EDITOR'
|
||||||
bl_region_type = 'TOOLS'
|
bl_region_type = 'TOOLS'
|
||||||
|
|
||||||
|
|
||||||
class CLIP_PT_tools_mask(MASK_PT_tools, Panel):
|
|
||||||
bl_space_type = 'CLIP_EDITOR'
|
|
||||||
bl_region_type = 'TOOLS'
|
|
||||||
|
|
||||||
# --- end mask ---
|
# --- end mask ---
|
||||||
|
|
||||||
|
|
||||||
@@ -1553,8 +1543,6 @@ classes = (
|
|||||||
CLIP_PT_mask_display,
|
CLIP_PT_mask_display,
|
||||||
CLIP_PT_active_mask_spline,
|
CLIP_PT_active_mask_spline,
|
||||||
CLIP_PT_active_mask_point,
|
CLIP_PT_active_mask_point,
|
||||||
CLIP_PT_tools_mask,
|
|
||||||
CLIP_PT_tools_mask_add,
|
|
||||||
CLIP_PT_tools_mask_transforms,
|
CLIP_PT_tools_mask_transforms,
|
||||||
CLIP_PT_footage,
|
CLIP_PT_footage,
|
||||||
CLIP_PT_tools_scenesetup,
|
CLIP_PT_tools_scenesetup,
|
||||||
|
|||||||
@@ -646,6 +646,7 @@ class MASK_MT_editor_menus(Menu):
|
|||||||
if show_uvedit:
|
if show_uvedit:
|
||||||
layout.menu("IMAGE_MT_uvs")
|
layout.menu("IMAGE_MT_uvs")
|
||||||
if show_maskedit:
|
if show_maskedit:
|
||||||
|
layout.menu("MASK_MT_add")
|
||||||
layout.menu("MASK_MT_mask")
|
layout.menu("MASK_MT_mask")
|
||||||
|
|
||||||
|
|
||||||
@@ -659,8 +660,6 @@ from .properties_mask_common import (
|
|||||||
MASK_PT_spline,
|
MASK_PT_spline,
|
||||||
MASK_PT_point,
|
MASK_PT_point,
|
||||||
MASK_PT_display,
|
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'
|
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 ---
|
# --- end mask ---
|
||||||
|
|
||||||
|
|
||||||
@@ -1381,7 +1368,6 @@ classes = (
|
|||||||
IMAGE_HT_header,
|
IMAGE_HT_header,
|
||||||
MASK_MT_editor_menus,
|
MASK_MT_editor_menus,
|
||||||
IMAGE_PT_mask,
|
IMAGE_PT_mask,
|
||||||
IMAGE_PT_tools_mask_add,
|
|
||||||
IMAGE_PT_mask_layers,
|
IMAGE_PT_mask_layers,
|
||||||
IMAGE_PT_mask_display,
|
IMAGE_PT_mask_display,
|
||||||
IMAGE_PT_active_mask_spline,
|
IMAGE_PT_active_mask_spline,
|
||||||
@@ -1395,7 +1381,6 @@ classes = (
|
|||||||
IMAGE_PT_paint,
|
IMAGE_PT_paint,
|
||||||
IMAGE_PT_tools_brush_overlay,
|
IMAGE_PT_tools_brush_overlay,
|
||||||
IMAGE_PT_tools_brush_texture,
|
IMAGE_PT_tools_brush_texture,
|
||||||
IMAGE_PT_tools_mask,
|
|
||||||
IMAGE_PT_tools_mask_texture,
|
IMAGE_PT_tools_mask_texture,
|
||||||
IMAGE_PT_tools_brush_tool,
|
IMAGE_PT_tools_brush_tool,
|
||||||
IMAGE_PT_paint_stroke,
|
IMAGE_PT_paint_stroke,
|
||||||
|
|||||||
Reference in New Issue
Block a user