From fd0dec41624c38d505b8ed14b1ce56aecb8420c6 Mon Sep 17 00:00:00 2001 From: Pullusb Date: Fri, 27 May 2022 12:29:39 +0200 Subject: [PATCH] disable module reload in background mode --- __init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/__init__.py b/__init__.py index 23999b6..e507598 100644 --- a/__init__.py +++ b/__init__.py @@ -33,9 +33,10 @@ functions = [ import bpy if "bpy" in locals(): - for name in modules + functions: - module = importlib.import_module(name, __name__) - importlib.reload(module) + if not bpy.app.background: + for name in modules + functions: + module = importlib.import_module(name, __name__) + importlib.reload(module) def register(): if bpy.app.background: