Skip to content
Snippets Groups Projects
Commit c24bd5bb authored by Bastien Montagne's avatar Bastien Montagne
Browse files

Fix T41500: mesh_f2.py annoying exception when running blender from terminal...

Fix T41500: mesh_f2.py annoying exception when running blender from terminal with '--background --python'

keyconfigs are not available in background mode...
parent dcb4b78b
No related branches found
No related tags found
No related merge requests found
......@@ -384,10 +384,11 @@ def register():
bpy.utils.register_class(c)
# add keymap entry
km = bpy.context.window_manager.keyconfigs.addon.keymaps.new(\
name='Mesh', space_type='EMPTY')
kmi = km.keymap_items.new("mesh.f2", 'F', 'PRESS')
addon_keymaps.append((km, kmi))
kcfg = bpy.context.window_manager.keyconfigs.addon
if kcfg:
km = kcfg.keymaps.new(name='Mesh', space_type='EMPTY')
kmi = km.keymap_items.new("mesh.f2", 'F', 'PRESS')
addon_keymaps.append((km, kmi))
def unregister():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment