disable module reload in background mode

blender3.6
Pullusb 2022-05-27 12:29:39 +02:00
parent 0b55bf671d
commit fd0dec4162
1 changed files with 4 additions and 3 deletions

View File

@ -33,9 +33,10 @@ functions = [
import bpy import bpy
if "bpy" in locals(): if "bpy" in locals():
for name in modules + functions: if not bpy.app.background:
module = importlib.import_module(name, __name__) for name in modules + functions:
importlib.reload(module) module = importlib.import_module(name, __name__)
importlib.reload(module)
def register(): def register():
if bpy.app.background: if bpy.app.background: