From db70de6f3b9da3358b72018d25598823c4f041c7 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Sat, 26 Mar 2011 09:21:33 +0000 Subject: [PATCH] patch [#26620] Correction leakage [#26601] Python error when use of autocomplete from perfection cat (sindra1961) --- development_api_navigator.py | 2 +- mesh_surface_sketch.py | 4 ++-- space_view3d_copy_attributes.py | 12 ++++++------ space_view3d_materials_utils.py | 2 +- space_view3d_spacebar_menu.py | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/development_api_navigator.py b/development_api_navigator.py index ed1945f91..7a886bbfa 100644 --- a/development_api_navigator.py +++ b/development_api_navigator.py @@ -664,7 +664,7 @@ def register_keymaps(): km = kc.keymaps.get("Text") if km is None: km = kc.keymaps.new(name="Text") - kmi = km.items.new('api_navigator.toggle_doc', 'ESC', 'PRESS') + kmi = km.keymap_items.new('api_navigator.toggle_doc', 'ESC', 'PRESS') def unregister_keymaps(): diff --git a/mesh_surface_sketch.py b/mesh_surface_sketch.py index 5587730b3..7863aaec8 100644 --- a/mesh_surface_sketch.py +++ b/mesh_surface_sketch.py @@ -798,8 +798,8 @@ def register(): km = kc.keymaps.get("3D View") if km is None: km = kc.keymaps.new(name="3D View") - keymap_item_add_surf = km.items.new(GPENCIL_OT_surfsk_surface_add.bl_idname,"E","PRESS", key_modifier="D") - keymap_item_stroke_to_curve = km.items.new(GPENCIL_OT_surfsk_strokes_to_curves.bl_idname,"C","PRESS", key_modifier="D") + keymap_item_add_surf = km.keymap_items.new(GPENCIL_OT_surfsk_surface_add.bl_idname,"E","PRESS", key_modifier="D") + keymap_item_stroke_to_curve = km.keymap_items.new(GPENCIL_OT_surfsk_strokes_to_curves.bl_idname,"C","PRESS", key_modifier="D") def unregister(): diff --git a/space_view3d_copy_attributes.py b/space_view3d_copy_attributes.py index 9cdd867db..a46383a28 100644 --- a/space_view3d_copy_attributes.py +++ b/space_view3d_copy_attributes.py @@ -734,17 +734,17 @@ def register(): km = kc.keymaps.get("Object Mode") if km is None: km = kc.keymaps.new(name="Object Mode") - kmi = km.items.new('wm.call_menu', 'C', 'PRESS', ctrl=True) + kmi = km.keymap_items.new('wm.call_menu', 'C', 'PRESS', ctrl=True) kmi.properties.name = 'VIEW3D_MT_copypopup' km = kc.keymaps.get("Pose") if km is None: km = kc.keymaps.new(name="Pose") - kmi = km.items.get("pose.copy") + kmi = km.keymap_items.get("pose.copy") if kmi is not None: kmi.idname = 'wm.call_menu' else: - kmi = km.items.new('wm.call_menu', 'C', 'PRESS', ctrl=True) + kmi = km.keymap_items.new('wm.call_menu', 'C', 'PRESS', ctrl=True) kmi.properties.name = 'VIEW3D_MT_posecopypopup' for menu in _layer_menus: bpy.utils.register_class(menu) @@ -752,7 +752,7 @@ def register(): km = kc.keymaps.get("Mesh") if km is None: km = kc.keymaps.new(name="Mesh") - kmi = km.items.new('wm.call_menu', 'C', 'PRESS') + kmi = km.keymap_items.new('wm.call_menu', 'C', 'PRESS') kmi.ctrl = True kmi.properties.name = 'MESH_MT_CopyFaceSettings' @@ -771,10 +771,10 @@ def unregister(): bpy.utils.unregister_class(menu) bpy.types.DATA_PT_texface.remove(_add_tface_buttons) km = bpy.context.window_manager.keyconfigs.active.keymaps['Mesh'] - for kmi in km.items: + for kmi in km.keymap_items: if kmi.idname == 'wm.call_menu': if kmi.properties.name == 'MESH_MT_CopyFaceSettings': - km.items.remove(kmi) + km.keymap_items.remove(kmi) if __name__ == "__main__": register() diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py index 3f4d6ac55..1d6037182 100644 --- a/space_view3d_materials_utils.py +++ b/space_view3d_materials_utils.py @@ -676,7 +676,7 @@ def register(): bpy.utils.register_module(__name__) km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View'] - kmi = km.items.new('wm.call_menu', 'Q', 'PRESS') + kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS') kmi.properties.name = "VIEW3D_MT_master_material" def unregister(): diff --git a/space_view3d_spacebar_menu.py b/space_view3d_spacebar_menu.py index 79047a8f7..98bcadf3d 100644 --- a/space_view3d_spacebar_menu.py +++ b/space_view3d_spacebar_menu.py @@ -1542,7 +1542,7 @@ def register(): bpy.utils.register_module(__name__) km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View'] - kmi = km.items.new('wm.call_menu', 'SPACE', 'PRESS') + kmi = km.keymap_items.new('wm.call_menu', 'SPACE', 'PRESS') kmi.properties.name = "VIEW3D_MT_Space_Dynamic_Menu" -- GitLab