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-05 02:22:14 +0300
committerlijenstina <lijenstina@gmail.com>2017-07-05 02:22:14 +0300
commit99ed610784b804c175d9e189d9a1b3036973ed61 (patch)
tree9865ee8d7e95d9747a349409139e0849db6d1d60 /space_view3d_pie_menus/pie_animation_menu.py
parent759595b17b3a4b04f800d2c12e2af80aa63e4c29 (diff)
3D Viewport Pie Menus: Cleanup, refactor, fix key register
Bumped version to 1.1.5 Pep8 cleanup Remove the pie_origin_cursor.py since it is not needed anymore Part of the T51547: refactor the key unregister code so it matches the official pies Note: using this code was crashing blender because of Bool Tool key registration that left out some lingering keys on unregister reload Also there were some wrong calls with the unregister within the pies themselves Merge some operators where possible (around 7 less in total) and use passing arguments instead Add Enable All / Disable all buttons in the preferences Comment out the code for authors in the init instead of in individual scripts Remove unused imports and cameratoto scene prop Add an icon at end of registrations line Fix several crashes with operators being called out of context
Diffstat (limited to 'space_view3d_pie_menus/pie_animation_menu.py')
-rw-r--r--space_view3d_pie_menus/pie_animation_menu.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/space_view3d_pie_menus/pie_animation_menu.py b/space_view3d_pie_menus/pie_animation_menu.py
index 7f7a3684..d65891f9 100644
--- a/space_view3d_pie_menus/pie_animation_menu.py
+++ b/space_view3d_pie_menus/pie_animation_menu.py
@@ -21,8 +21,8 @@
bl_info = {
"name": "Hotkey: 'Alt A'",
"description": "Pie menu for Timeline controls",
- # "author": "pitiwazou, meta-androcto",
- # "version": (0, 1, 0),
+ "author": "pitiwazou, meta-androcto",
+ "version": (0, 1, 1),
"blender": (2, 77, 0),
"location": "3D View",
"warning": "",
@@ -85,6 +85,7 @@ class InsertAutoKeyframe(Operator):
return {'FINISHED'}
+
classes = (
PieAnimation,
InsertAutoKeyframe
@@ -96,29 +97,26 @@ addon_keymaps = []
def register():
for cls in classes:
bpy.utils.register_class(cls)
- wm = bpy.context.window_manager
+ wm = bpy.context.window_manager
if wm.keyconfigs.addon:
# Animation
km = wm.keyconfigs.addon.keymaps.new(name='Object Non-modal')
kmi = km.keymap_items.new('wm.call_menu_pie', 'A', 'PRESS', alt=True)
kmi.properties.name = "pie.animation"
- # kmi.active = True
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:
- km = kc.keymaps['Object Non-modal']
- for kmi in km.keymap_items:
- if kmi.idname == 'wm.call_menu_pie':
- if kmi.properties.name == "pie.animation":
- km.keymap_items.remove(kmi)
+ for km, kmi in addon_keymaps:
+ km.keymap_items.remove(kmi)
+ addon_keymaps.clear()
if __name__ == "__main__":