rig_picker/__init__.py

45 lines
922 B
Python
Raw Normal View History

2022-04-06 10:12:32 +02:00
bl_info = {
"name": "Rig Picker",
"author": "Christophe Seux",
"version": (0, 1),
2022-05-26 15:46:57 +02:00
"blender": (3, 0, 2),
2022-04-06 10:12:32 +02:00
"location": "",
"description": "",
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "Rigging"}
import importlib
2023-11-09 10:29:56 +01:00
modules = (
'.operators',
2022-04-06 10:12:32 +02:00
'.properties',
2024-02-19 11:53:15 +01:00
'.ui',
2022-04-06 10:12:32 +02:00
'.area',
'.gizmo',
2023-11-09 10:29:56 +01:00
'.draw_handlers'
)
2022-04-06 10:12:32 +02:00
import bpy
if "bpy" in locals():
if not bpy.app.background:
2023-11-09 10:29:56 +01:00
for name in modules:
module = importlib.import_module(name, __name__)
importlib.reload(module)
2022-04-06 10:12:32 +02:00
def register():
2022-05-26 15:46:57 +02:00
if bpy.app.background:
return
2022-04-06 10:12:32 +02:00
for name in modules:
module = importlib.import_module(name, __name__)
module.register()
def unregister():
2022-05-26 15:46:57 +02:00
if bpy.app.background:
return
2022-04-06 10:12:32 +02:00
for name in reversed(modules):
module = importlib.import_module(name, __name__)
module.unregister()