-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy path__init__.py
77 lines (57 loc) · 2.1 KB
/
__init__.py
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
# SPDX-FileCopyrightText: 2014-2024 Mikhail Rachinskiy
# SPDX-License-Identifier: GPL-3.0-or-later
if "bpy" in locals():
from pathlib import Path
from . import _essential
_essential.reload_recursive(Path(__file__).parent, locals())
else:
import bpy
from bpy.props import PointerProperty
from . import op_offset, ops_anim, ops_proxy, ops_shapekey, preferences, ui
classes = (
preferences.CommotionShapeKeyCollection,
preferences.SceneProperties,
preferences.WmProperties,
ui.VIEW3D_MT_commotion,
ui.VIEW3D_PT_commotion_animation_offset,
ui.VIEW3D_PT_commotion_animation_utils,
ui.VIEW3D_PT_commotion_shape_keys,
ui.VIEW3D_PT_commotion_proxy_effector,
ui.VIEW3D_PT_commotion_proxy_effector_loc,
ui.VIEW3D_PT_commotion_proxy_effector_rot,
ui.VIEW3D_PT_commotion_proxy_effector_sca,
ui.VIEW3D_PT_commotion_proxy_effector_sk,
ui.VIEW3D_PT_commotion_proxy_effector_bake,
op_offset.ANIM_OT_animation_offset,
op_offset.ANIM_OT_animation_offset_eyedropper,
ops_shapekey.OBJECT_OT_sk_coll_refresh,
ops_shapekey.OBJECT_OT_sk_interpolation_set,
ops_shapekey.ANIM_OT_sk_generate_keyframes,
ops_anim.ANIM_OT_animation_copy,
ops_anim.ANIM_OT_animation_link,
ops_anim.ANIM_OT_animation_convert,
ops_proxy.ANIM_OT_bake,
ops_proxy.ANIM_OT_bake_remove,
)
def register():
for cls in classes:
bpy.utils.register_class(cls)
bpy.types.Scene.commotion = PointerProperty(type=preferences.SceneProperties)
bpy.types.WindowManager.commotion = PointerProperty(type=preferences.WmProperties)
# Menu
# ---------------------------
bpy.types.VIEW3D_MT_object.append(ui.draw_commotion_menu)
def unregister():
from . import proxy_effector
for cls in classes:
bpy.utils.unregister_class(cls)
del bpy.types.Scene.commotion
del bpy.types.WindowManager.commotion
# Menu
# ---------------------------
bpy.types.VIEW3D_MT_object.remove(ui.draw_commotion_menu)
# Handlers
# ---------------------------
proxy_effector.handler_del()
if __name__ == "__main__":
register()