prevent keymap register in background mode
2.1.6 - Fixed: Prevent some keymaps to register when blender is launched in background modegpv2
parent
4ae5d3a55b
commit
80ec798144
|
@ -1,6 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
|
||||
2.1.6
|
||||
|
||||
- Fixed: Prevent some keymaps to register when blender is launched in background mode
|
||||
|
||||
2.1.5
|
||||
|
||||
- fixed: false positive with checkfile in modifier layer target
|
||||
|
|
|
@ -759,6 +759,8 @@ class GPTB_OT_add_gp_layer(Operator):
|
|||
|
||||
addon_keymaps = []
|
||||
def register_keymaps():
|
||||
if bpy.app.background:
|
||||
return
|
||||
addon = bpy.context.window_manager.keyconfigs.addon
|
||||
|
||||
##---# Insert Layers
|
||||
|
@ -789,6 +791,8 @@ def register_keymaps():
|
|||
|
||||
|
||||
def unregister_keymaps():
|
||||
if bpy.app.background:
|
||||
return
|
||||
for km, kmi in addon_keymaps:
|
||||
km.keymap_items.remove(kmi)
|
||||
addon_keymaps.clear()
|
||||
|
|
|
@ -4,7 +4,7 @@ bl_info = {
|
|||
"name": "GP toolbox",
|
||||
"description": "Tool set for Grease Pencil in animation production",
|
||||
"author": "Samuel Bernou, Christophe Seux",
|
||||
"version": (2, 1, 5),
|
||||
"version": (2, 1, 6),
|
||||
"blender": (3, 0, 0),
|
||||
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
||||
"warning": "",
|
||||
|
|
Loading…
Reference in New Issue