disable on background mode

3.0.2
blender3.6
Pullusb 2022-05-26 15:46:57 +02:00
parent 1c0c2f45bf
commit 0b55bf671d
1 changed files with 5 additions and 1 deletions

View File

@ -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()