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:
authorlijenstina <lijenstina@gmail.com>2017-07-02 13:37:39 +0300
committerlijenstina <lijenstina@gmail.com>2017-07-02 13:37:39 +0300
commit2e7de78293291168d159c5922311b5faddc6f384 (patch)
tree85e18866a4487139f8334d5a35e475d3040379cd /pie_menus_official/pie_pivot_of.py
parent5f6db2960476d0f7e385e5603d27f3802cbc6249 (diff)
UI Pie Menu Official: Cleanup, update to version 1.1.5
Bumped version to 1.1.5 Pep8 cleanup Remove unused imports - Operator was copy pasted Comment out the code for getting the submodule name instead of commenting out the bl_info entries Add an icon to the End of the Pie activation label Fix several crashes in the Clip Editor Pies related to calling them when the clip was missing Fix crash with Pivot pie when there is no active object
Diffstat (limited to 'pie_menus_official/pie_pivot_of.py')
-rw-r--r--pie_menus_official/pie_pivot_of.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/pie_menus_official/pie_pivot_of.py b/pie_menus_official/pie_pivot_of.py
index 43d6c860..88677b69 100644
--- a/pie_menus_official/pie_pivot_of.py
+++ b/pie_menus_official/pie_pivot_of.py
@@ -2,8 +2,8 @@
bl_info = {
"name": "Pivot Menu: Key: '. key'",
"description": "Manipulator Modes",
-# "author": "Antony Riakiotakis, Sebastian Koenig",
-# "version": (0, 1, 0),
+ "author": "Antony Riakiotakis, Sebastian Koenig",
+ "version": (0, 1, 1),
"blender": (2, 77, 0),
"location": ". key",
"warning": "",
@@ -12,10 +12,8 @@ bl_info = {
}
import bpy
-from bpy.types import (
- Menu,
- Operator,
- )
+from bpy.types import Menu
+
# Pie Pivot Mode - . key
class VIEW3D_PIE_pivot_of(Menu):
@@ -27,15 +25,17 @@ class VIEW3D_PIE_pivot_of(Menu):
pie = layout.menu_pie()
pie.prop(context.space_data, "pivot_point", expand=True)
- if context.active_object.mode == 'OBJECT':
+ if context.active_object and context.active_object.mode == 'OBJECT':
pie.prop(context.space_data, "use_pivot_point_align", text="Center Points")
-classes = [
- VIEW3D_PIE_pivot_of
- ]
+
+classes = (
+ VIEW3D_PIE_pivot_of,
+ )
addon_keymaps = []
+
def register():
for cls in classes:
bpy.utils.register_class(cls)
@@ -48,16 +48,18 @@ def register():
kmi.properties.name = "view3d.pivot_of"
addon_keymaps.append((km, kmi))
+
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
- wm = bpy.context.window_manager
+ wm = bpy.context.window_manager
kc = wm.keyconfigs.addon
if kc:
for km, kmi in addon_keymaps:
km.keymap_items.remove(kmi)
addon_keymaps.clear()
+
if __name__ == "__main__":
register()