From 72690bbeca854423355f5cc4507726aecd9898c3 Mon Sep 17 00:00:00 2001 From: Sebastian Koenig Date: Wed, 19 Jun 2019 15:05:25 +0200 Subject: Bring mask tools back to Masking Tool Area and update Context Menu The mask tools in the Tool Area of Clip Editor where never brought back, after decision was made to postpone proper masking tools to 2.81. This brings back the Mask Tool Panel in the Mask tab of Masking Tool Area. This Diff also adds a better Context Menu, which respects whether you're in Masking or Tracking mode. I have added the most important operators there, with a focus on those that are otherwise harder to access. Reviewers: sergey, billreynish Subscribers: sebastian, brecht, hype Tags: #motion_tracking Differential Revision: https://developer.blender.org/D5075 --- .../startup/bl_ui/properties_mask_common.py | 35 +++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui/properties_mask_common.py') diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index 872b51d51ff..fd8ca542f9f 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -239,7 +239,6 @@ class MASK_PT_transforms: # ~ bl_region_type = 'TOOLS' bl_label = "Transforms" bl_category = "Mask" - bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): @@ -257,6 +256,40 @@ class MASK_PT_transforms: col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN' +class MASK_PT_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").type = 'VECTOR' + 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_MT_add(Menu): bl_label = "Add" -- cgit v1.2.3