From 1017c01668c2ba768989ab8dff628d679e082bc7 Mon Sep 17 00:00:00 2001 From: Pullusb Date: Mon, 30 Aug 2021 10:40:38 +0200 Subject: [PATCH] fix bg open error 1.6.2 - disable keymap register for breakdowner on background --- CHANGELOG.md | 4 ++++ OP_breakdowner.py | 6 ++++-- __init__.py | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da8c263..8bddac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +1.6.2 + +- disable keymap register for breakdowner on background + 1.6.1 - removed: Auto Updater that was failing since 2.93 diff --git a/OP_breakdowner.py b/OP_breakdowner.py index 04a8b11..fc83787 100644 --- a/OP_breakdowner.py +++ b/OP_breakdowner.py @@ -304,6 +304,8 @@ class OBJ_OT_breakdown_obj_anim(bpy.types.Operator): breakdowner_addon_keymaps = [] def register_keymaps(): + if bpy.app.background: + return # pref = get_addon_prefs() # if not pref.breakdowner_use_shortcut: # return @@ -323,6 +325,8 @@ def register_keymaps(): breakdowner_addon_keymaps.append((km, kmi)) def unregister_keymaps(): + if bpy.app.background: + return for km, kmi in breakdowner_addon_keymaps: km.keymap_items.remove(kmi) @@ -332,12 +336,10 @@ def unregister_keymaps(): ### --- REGISTER --- def register(): - # if not bpy.app.background: bpy.utils.register_class(OBJ_OT_breakdown_obj_anim) register_keymaps() def unregister(): - # if not bpy.app.background: unregister_keymaps() bpy.utils.unregister_class(OBJ_OT_breakdown_obj_anim) diff --git a/__init__.py b/__init__.py index 989cdda..a036201 100755 --- a/__init__.py +++ b/__init__.py @@ -15,7 +15,7 @@ bl_info = { "name": "GP toolbox", "description": "Set of tools for Grease Pencil in animation production", "author": "Samuel Bernou, Christophe Seux", -"version": (1, 6, 1), +"version": (1, 6, 2), "blender": (2, 91, 0), "location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties", "warning": "",