This repository was archived by the owner on Feb 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
96 lines (81 loc) · 2.63 KB
/
__init__.py
File metadata and controls
96 lines (81 loc) · 2.63 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
bl_info = {
"name": "Tivoli Blender Tools",
"author": "Tivoli Cloud VR, Inc.",
"description": "",
"version": (0, 0, 0),
"blender": (2, 82, 0),
"location": "View 3D > Tool Shelf > Tivoli",
"warning": "",
"category": "3D View",
}
import bpy
from bpy.utils import register_class, unregister_class
from .settings import *
from .operators.avatar.add_armature import *
from .operators.avatar.add_tivoli_settings_node import *
from .operators.avatar.add_gltf_settings_node import *
from .operators.avatar.export_avatar import *
from .operators.avatar.force_tpose import *
from .operators.avatar.fix_bone_rotations import *
from .operators.avatar.ensure_root_bone import *
from .operators.lightmap.prepare_uv_maps import *
from .operators.lightmap.prepare_materials import *
from .operators.lightmap.bake_scene import *
from .operators.lightmap.export_scene import *
from .operators.export_scene import *
from .operators.animation.shape_key_animation_to_bones import *
from .operators.animation.bake_physics_with_mdd import *
from .panels.avatar import *
from .panels.lightmap import *
from .panels.export_scene import *
from .panels.animation import *
classes = (
TivoliSettings,
# avatar operators
AvatarAddArmature,
AvatarExportAvatar,
AvatarAddTivoliSettingsNode,
AvatarAddGltfSettingsNode,
AvatarForceTPose,
AvatarFixBoneRotations,
AvatarEnsureRootBone,
# lightmap operators
LightmapPrepareUVMaps,
LightmapPrepareMaterials,
LightmapBakeScene,
LightmapExportScene,
# export scene operators
ExportScene,
# animation operators
AnimationBakePhysicsWithMdd,
AnimationShapeKeyAnimationToBones,
# panels
AvatarPanel,
ExportScenePanel,
LightmapPanel,
AnimationPanel
)
# main_register, main_unregister = bpy.utils.register_classes_factory(classes)
def menu_func_export(self, context):
self.layout.operator(
AvatarExportAvatar.bl_idname, text="Tivoli Avatar (.fst)"
)
def register():
# main_register()
for cls in classes:
try:
bpy.utils.register_class(cls)
except Exception as e:
print("ERROR: Failed to register class {0}: {1}".format(cls, e))
bpy.types.TOPBAR_MT_file_export.append(menu_func_export)
bpy.types.Scene.tivoli_settings = bpy.props.PointerProperty(
type=TivoliSettings
)
def unregister():
# main_unregister()
for cls in classes:
try:
bpy.utils.unregister_class(cls)
except Exception as e:
print("ERROR: Failed to unregister class {0}: {1}".format(cls, e))
bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)