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'
|
||||
|
||||
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user