Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-11-25 11:46:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2014-11-25 11:47:07 +0300
commit40b654f13c0401e7c65d30a48cf9c4832e862d1b (patch)
treeafc5ff48e50070aef41ec9d29d40094d9a68645a /ui_pie_menus_official.py
parentb83c1181425040f1e10d0826bb8e218ed8ee938a (diff)
pie menu: add toggle quadview to 'more' menu
also minor cleanup
Diffstat (limited to 'ui_pie_menus_official.py')
-rw-r--r--ui_pie_menus_official.py46
1 files changed, 22 insertions, 24 deletions
diff --git a/ui_pie_menus_official.py b/ui_pie_menus_official.py
index d13a05bc..cc862f1d 100644
--- a/ui_pie_menus_official.py
+++ b/ui_pie_menus_official.py
@@ -42,6 +42,7 @@ class VIEW3D_PIE_object_mode(Menu):
pie = layout.menu_pie()
pie.operator_enum("OBJECT_OT_mode_set", "mode")
+
class VIEW3D_PIE_view_more(Menu):
bl_label = "More"
@@ -54,6 +55,7 @@ class VIEW3D_PIE_view_more(Menu):
pie.operator("VIEW3D_OT_view_selected")
pie.operator("VIEW3D_OT_view_all")
pie.operator("VIEW3D_OT_localview")
+ pie.operator("SCREEN_OT_region_quadview")
class VIEW3D_PIE_view(Menu):
@@ -94,11 +96,11 @@ class VIEW3D_manipulator_set(Operator):
items=(('TRANSLATE', "Translate", "Use the manipulator for movement transformations"),
('ROTATE', "Rotate", "Use the manipulator for rotation transformations"),
('SCALE', "Scale", "Use the manipulator for scale transformations"),
- ),
- )
+ ),
+ )
def execute(self, context):
- #show manipulator if user selects an option
+ # show manipulator if user selects an option
context.space_data.show_manipulator = True
context.space_data.transform_manipulators = {self.type}
@@ -145,18 +147,22 @@ class VIEW3D_PIE_snap(Menu):
addon_keymaps = []
+classes = (
+ VIEW3D_manipulator_set,
-def register():
- bpy.utils.register_class(VIEW3D_manipulator_set)
+ VIEW3D_PIE_object_mode,
+ VIEW3D_PIE_view,
+ VIEW3D_PIE_view_more,
+ VIEW3D_PIE_shade,
+ VIEW3D_PIE_manipulator,
+ VIEW3D_PIE_pivot,
+ VIEW3D_PIE_snap,
+ )
- #register menus
- bpy.utils.register_class(VIEW3D_PIE_object_mode)
- bpy.utils.register_class(VIEW3D_PIE_view)
- bpy.utils.register_class(VIEW3D_PIE_view_more)
- bpy.utils.register_class(VIEW3D_PIE_shade)
- bpy.utils.register_class(VIEW3D_PIE_manipulator)
- bpy.utils.register_class(VIEW3D_PIE_pivot)
- bpy.utils.register_class(VIEW3D_PIE_snap)
+
+def register():
+ for cls in classes:
+ bpy.utils.register_class(cls)
wm = bpy.context.window_manager
@@ -179,15 +185,8 @@ def register():
def unregister():
- bpy.utils.unregister_class(VIEW3D_manipulator_set)
-
- bpy.utils.unregister_class(VIEW3D_PIE_object_mode)
- bpy.utils.unregister_class(VIEW3D_PIE_view)
- bpy.utils.unregister_class(VIEW3D_PIE_view_more)
- bpy.utils.unregister_class(VIEW3D_PIE_shade)
- bpy.utils.unregister_class(VIEW3D_PIE_manipulator)
- bpy.utils.unregister_class(VIEW3D_PIE_pivot)
- bpy.utils.unregister_class(VIEW3D_PIE_snap)
+ for cls in classes:
+ bpy.utils.unregister_class(cls)
wm = bpy.context.window_manager
@@ -198,5 +197,4 @@ def unregister():
wm.keyconfigs.addon.keymaps.remove(km)
- # clear the list
- del addon_keymaps[:]
+ addon_keymaps.clear()