From 0b55bf671d873a447c355572d3a0ebcda87fd8a1 Mon Sep 17 00:00:00 2001 From: Pullusb Date: Thu, 26 May 2022 15:46:57 +0200 Subject: [PATCH] disable on background mode 3.0.2 --- __init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 4023153..23999b6 100644 --- a/__init__.py +++ b/__init__.py @@ -2,7 +2,7 @@ bl_info = { "name": "Rig Picker", "author": "Christophe Seux", "version": (0, 1), - "blender": (3, 0, 1), + "blender": (3, 0, 2), "location": "", "description": "", "warning": "", @@ -38,11 +38,15 @@ if "bpy" in locals(): importlib.reload(module) def register(): + if bpy.app.background: + return for name in modules: module = importlib.import_module(name, __name__) module.register() def unregister(): + if bpy.app.background: + return for name in reversed(modules): module = importlib.import_module(name, __name__) module.unregister()