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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-09-16 22:37:19 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-09-16 22:37:19 +0400
commita549bab37f9b04414b56fa6c27ccdc5b584d880b (patch)
treee0b8a13effd0300fbab2c9aefebaf12b433fab7c
parent0b07efd6d48cfa3ce7dcaa768274c04a7f83fd99 (diff)
Related to #23861: addons now modify keyconfigs.default instead of
keyconfigs.active, this is consistent with internal operators, and means you're not messing with user edited data in register/unregister. [[Split portion of a mixed commit.]]
-rw-r--r--mesh_surface_sketch.py6
-rw-r--r--space_view3d_materials_utils.py4
-rw-r--r--space_view3d_spacebar_menu.py4
3 files changed, 7 insertions, 7 deletions
diff --git a/mesh_surface_sketch.py b/mesh_surface_sketch.py
index 46f2f21d..fb08e490 100644
--- a/mesh_surface_sketch.py
+++ b/mesh_surface_sketch.py
@@ -793,8 +793,8 @@ def register():
bpy.types.Scene.SURFSK_precision = bpy.props.IntProperty(name="Precision", description="Precision level of the surface calculation", default=4, min=0, max=100000)
bpy.types.Scene.SURFSK_keep_strokes = bpy.props.BoolProperty(name="Keep strokes", description="Keeps the sketched strokes after adding the surface", default=False)
- keymap_item_add_surf = bpy.data.window_managers[0].keyconfigs.active.keymaps["3D View"].items.new("GPENCIL_OT_SURFSK_add_surface","E","PRESS", key_modifier="D")
- keymap_item_stroke_to_curve = bpy.data.window_managers[0].keyconfigs.active.keymaps["3D View"].items.new("GPENCIL_OT_SURFSK_strokes_to_curves","C","PRESS", key_modifier="D")
+ keymap_item_add_surf = bpy.data.window_managers[0].keyconfigs.default.keymaps["3D View"].items.new("GPENCIL_OT_SURFSK_add_surface","E","PRESS", key_modifier="D")
+ keymap_item_stroke_to_curve = bpy.data.window_managers[0].keyconfigs.default.keymaps["3D View"].items.new("GPENCIL_OT_SURFSK_strokes_to_curves","C","PRESS", key_modifier="D")
def unregister():
@@ -803,7 +803,7 @@ def unregister():
del bpy.types.Scene.SURFSK_precision
del bpy.types.Scene.SURFSK_keep_strokes
- km = bpy.data.window_managers[0].keyconfigs.active.keymaps["3D View"]
+ km = bpy.data.window_managers[0].keyconfigs.default.keymaps["3D View"]
for kmi in km.items:
if kmi.idname == 'wm.call_menu':
if kmi.properties.name == "GPENCIL_OT_SURFSK_add_surface":
diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py
index 2b928607..21eba8b1 100644
--- a/space_view3d_materials_utils.py
+++ b/space_view3d_materials_utils.py
@@ -673,12 +673,12 @@ class VIEW3D_MT_select_material(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']
kmi = km.items.new('wm.call_menu', 'Q', 'PRESS')
kmi.properties.name = "VIEW3D_MT_master_material"
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_master_material":
diff --git a/space_view3d_spacebar_menu.py b/space_view3d_spacebar_menu.py
index 52be71cc..129988f7 100644
--- a/space_view3d_spacebar_menu.py
+++ b/space_view3d_spacebar_menu.py
@@ -1454,13 +1454,13 @@ class VIEW3D_MT_undoS(bpy.types.Menu):
layout.operator("ed.redo", icon='TRIA_RIGHT')
def register():
- km = bpy.context.window_manager.keyconfigs.active.keymaps['3D View']
+ km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View']
kmi = km.items.new('wm.call_menu', 'SPACE', 'PRESS')
kmi.properties.name = "VIEW3D_MT_Space_Dynamic_Menu"
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_Space_Dynamic_Menu":