forked from Seris0/QuickImportXXMI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
40 lines (32 loc) · 1.16 KB
/
__init__.py
File metadata and controls
40 lines (32 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# __init__.py
from pathlib import Path
import importlib
bl_info = {
"name": "XXMI Scripts & Quick Import",
"author": "Gustav0, LeoTorreZ",
"version": (3, 0, 7),
"blender": (3, 6, 2),
"description": "Script Compilation",
"category": "Object",
"tracker_url": "https://github.com/Seris0/Gustav0/tree/main/Addons/QuickImportXXMI",
}
def reload_package(module_dict_main):
def reload_package_recursive(current_dir, module_dict):
for path in current_dir.iterdir():
if "__init__" in str(path) or path.stem not in module_dict:
continue
if path.is_file() and path.suffix == ".py":
importlib.reload(module_dict[path.stem])
elif path.is_dir():
reload_package_recursive(path, module_dict[path.stem].__dict__)
reload_package_recursive(Path(__file__).parent, module_dict_main)
if "bpy" in locals():
import bpy #type: ignore
reload_package(locals())
from . import registration
def register():
registration.register()
def unregister():
registration.unregister()
if __name__ == '__main__':
register()