diff options
-rw-r--r-- | release/scripts/startup/bl_operators/__init__.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/mask.py | 40 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_mask_common.py | 15 |
3 files changed, 15 insertions, 41 deletions
diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py index bb92e070d00..5af2bd22222 100644 --- a/release/scripts/startup/bl_operators/__init__.py +++ b/release/scripts/startup/bl_operators/__init__.py @@ -32,7 +32,6 @@ _modules = [ "constraint", "file", "image", - "mask", "mesh", "node", "object", diff --git a/release/scripts/startup/bl_operators/mask.py b/release/scripts/startup/bl_operators/mask.py deleted file mode 100644 index 2635f535b0b..00000000000 --- a/release/scripts/startup/bl_operators/mask.py +++ /dev/null @@ -1,40 +0,0 @@ -# ##### BEGIN GPL LICENSE BLOCK ##### -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# ##### END GPL LICENSE BLOCK ##### - -# <pep8-80 compliant> - -from bpy.types import Menu -from bpy.app.translations import contexts as i18n_contexts - - -class MASK_MT_add(Menu): - bl_idname = "MASK_MT_add" - bl_label = "Add" - bl_translation_context = i18n_contexts.operator_default - - def draw(self, _context): - layout = self.layout - - layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("mask.primitive_circle_add", text="Circle", icon='MESH_CIRCLE') - layout.operator("mask.primitive_square_add", text="Square", icon='MESH_PLANE') - - -classes = ( - MASK_MT_add, -) diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index 94d7ac2c91e..108a417c97d 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -22,6 +22,7 @@ # menus are referenced `as is` from bpy.types import Menu, UIList +from bpy.app.translations import contexts as i18n_contexts class MASK_UL_layers(UIList): @@ -320,6 +321,19 @@ class MASK_MT_mask(Menu): layout.menu("MASK_MT_animation") +class MASK_MT_add(Menu): + bl_idname = "MASK_MT_add" + bl_label = "Add" + bl_translation_context = i18n_contexts.operator_default + + def draw(self, _context): + layout = self.layout + + layout.operator_context = 'INVOKE_REGION_WIN' + layout.operator("mask.primitive_circle_add", text="Circle", icon='MESH_CIRCLE') + layout.operator("mask.primitive_square_add", text="Square", icon='MESH_PLANE') + + class MASK_MT_visibility(Menu): bl_label = "Show/Hide" @@ -383,6 +397,7 @@ class MASK_MT_select(Menu): classes = ( MASK_UL_layers, MASK_MT_mask, + MASK_MT_add, MASK_MT_visibility, MASK_MT_transform, MASK_MT_animation, |