Related to #23861: addons now modify keyconfigs.default instead of
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 16 Sep 2010 18:37:19 +0000 (18:37 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 16 Sep 2010 18:37:19 +0000 (18:37 +0000)
keyconfigs.active, this is consistent with internal operators, and
means you're not messing with user edited data in register/unregister.

space_view3d_manipulator_Menu.py

index 8bd1ce59c1e6165b24162dfc24ff4b34aada3e13..d54b10a9fcd71612761c876d6958ddf941db235c 100644 (file)
@@ -107,7 +107,7 @@ class VIEW3D_MT_ManipulatorMenu(bpy.types.Menu):
 
 
 def register():
-    km = bpy.context.window_manager.keyconfigs.active.keymaps['3D View']
+    km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View']
     for kmi in km.items:
         if kmi.idname == 'wm.context_toggle':
             if kmi.ctrl and not kmi.shift and not kmi.alt and kmi.value =="PRESS":
@@ -119,7 +119,7 @@ def register():
 
 
 def unregister():
-    km = bpy.context.window_manager.keyconfigs.active.keymaps['3D View']
+    km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View']
     for kmi in km.items:
         if kmi.idname == 'wm.call_menu':
             if kmi.properties.name == "VIEW3D_MT_ManipulatorMenu":