diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-06 00:46:30 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-06 00:46:30 +0400 |
commit | 2f80c8db1172ae449d7908a4cb31d2425e5df823 (patch) | |
tree | c44a2faeaeecbdebd500221b0bd78d8d71db8a09 /space_view3d_materials_utils.py | |
parent | ba7827ff27fc77a0fccfa2495b52ddfbb5744dd1 (diff) |
Addon updates for keymap changes.
[[Split portion of a mixed commit.]]
Diffstat (limited to 'space_view3d_materials_utils.py')
-rw-r--r-- | space_view3d_materials_utils.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py index 2b3bb2d0..a0e43316 100644 --- a/space_view3d_materials_utils.py +++ b/space_view3d_materials_utils.py @@ -686,18 +686,15 @@ class VIEW3D_MT_select_material(bpy.types.Menu): def register(): bpy.utils.register_module(__name__) - kc = bpy.data.window_managers[0].keyconfigs.default - km = kc.keymaps.get("3D View") - if km is None: - km = kc.keymaps.new(name="3D View") - + kc = bpy.context.window_manager.keyconfigs.addon + km = kc.keymaps.new(name="3D View", space_type="VIEW_3D") kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS') kmi.properties.name = "VIEW3D_MT_master_material" def unregister(): bpy.utils.unregister_module(__name__) - kc = bpy.data.window_managers[0].keyconfigs.default + kc = bpy.context.window_manager.keyconfigs.addon km = kc.keymaps["3D View"] for kmi in km.keymap_items: if kmi.idname == 'wm.call_menu': |