-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
122 lines (95 loc) · 4.44 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import bpy
# Globals
from . B2REACT_Globals import B2REACT_Globals
# Panels UI
from . B2REACT_UI import B2REACT_PT_Init_Panel
# from . B2REACT_UI import B2REACT_PT_Edit_Panel
from . B2REACT_UI import B2REACT_PT_Utils_Panel
from . B2REACT_UI import B2REACT_PT_Export_Panel
from . B2REACT_UI import B2REACT_PT_gltfjsx_Options
from . B2REACT_UI import B2REACT_PT_Transform_Options
from . B2REACT_UI import B2REACT_PT_ExportActions
# Initialization Operators
from . init.create_r3f_project import B2REACT_OT_Create_R3F_Project
from . init.reset_git import B2REACT_OT_Reset_Git
from . init.open_vscode import B2REACT_OT_Open_Project_in_VSCode
from . init.open_folder import B2REACT_OT_open_project_folder
from . init.start_dev_server import B2REACT_OT_StartDevServer
from . init.delete_r3f_project import B2REACT_OT_Delete_R3F_Project
from . init.re_inizialize import B2REACT_OT_Re_Initialize
from . init.update_title import B2REACT_OT_Update_Title
# Utilities
from . utils.pushdown_actions import B2REACT_OT_Push_Down_Actions
from . utils.rename_tracks import B2REACT_OT_RenameTracks
from . utils.rename_object import B2REACT_OT_RenameObject
from . utils.parent_to_empty import B2REACT_OT_ParentToEmpty
# Export
# from . export.export_all_glb import R3F_OT_ExportAll_GLB
from . export.export_active_glb import B2REACT_OT_Export_Active_GLB
bl_info = {
"name": "Blender 2 React",
"author": "Robe Santoro",
"description": "Bring a Blender project to React Three Fiber",
"blender": (3, 6, 0),
"version": (0, 0, 1),
"location": "View3D > UI > Blender 2 React",
"category": "Blender2React"
}
def register():
# Register Globals
bpy.utils.register_class(B2REACT_Globals)
bpy.types.Scene.Blender2React = bpy.props.PointerProperty(type=B2REACT_Globals)
# Register Panels UI
bpy.utils.register_class(B2REACT_PT_Init_Panel)
# bpy.utils.register_class(B2REACT_PT_Edit_Panel)
bpy.utils.register_class(B2REACT_PT_Utils_Panel)
bpy.utils.register_class(B2REACT_PT_Export_Panel)
bpy.utils.register_class(B2REACT_PT_gltfjsx_Options)
bpy.utils.register_class(B2REACT_PT_Transform_Options)
bpy.utils.register_class(B2REACT_PT_ExportActions)
# Register Init Operators
bpy.utils.register_class(B2REACT_OT_Create_R3F_Project)
bpy.utils.register_class(B2REACT_OT_Reset_Git)
bpy.utils.register_class(B2REACT_OT_Open_Project_in_VSCode)
bpy.utils.register_class(B2REACT_OT_open_project_folder)
bpy.utils.register_class(B2REACT_OT_StartDevServer)
bpy.utils.register_class(B2REACT_OT_Delete_R3F_Project)
bpy.utils.register_class(B2REACT_OT_Re_Initialize)
bpy.utils.register_class(B2REACT_OT_Update_Title)
# Register Utilities
bpy.utils.register_class(B2REACT_OT_Push_Down_Actions)
bpy.utils.register_class(B2REACT_OT_RenameTracks)
bpy.utils.register_class(B2REACT_OT_RenameObject)
bpy.utils.register_class(B2REACT_OT_ParentToEmpty)
# bpy.utils.register_class(R3F_OT_ExportAll_GLB)
bpy.utils.register_class(B2REACT_OT_Export_Active_GLB)
def unregister():
# Unregister Panels UI
bpy.utils.unregister_class(B2REACT_PT_Init_Panel)
# bpy.utils.unregister_class(B2REACT_PT_Edit_Panel)
bpy.utils.unregister_class(B2REACT_PT_Utils_Panel)
bpy.utils.unregister_class(B2REACT_PT_Export_Panel)
bpy.utils.unregister_class(B2REACT_PT_gltfjsx_Options)
bpy.utils.unregister_class(B2REACT_PT_Transform_Options)
bpy.utils.unregister_class(B2REACT_PT_ExportActions)
# Unregister Init Operators
bpy.utils.unregister_class(B2REACT_OT_Create_R3F_Project)
bpy.utils.unregister_class(B2REACT_OT_Reset_Git)
bpy.utils.unregister_class(B2REACT_OT_Open_Project_in_VSCode)
bpy.utils.unregister_class(B2REACT_OT_open_project_folder)
bpy.utils.unregister_class(B2REACT_OT_StartDevServer)
bpy.utils.unregister_class(B2REACT_OT_Delete_R3F_Project)
bpy.utils.unregister_class(B2REACT_OT_Re_Initialize)
bpy.utils.unregister_class(B2REACT_OT_Update_Title)
# Unregister Utilities
bpy.utils.unregister_class(B2REACT_OT_Push_Down_Actions)
bpy.utils.unregister_class(B2REACT_OT_RenameTracks)
bpy.utils.unregister_class(B2REACT_OT_RenameObject)
bpy.utils.unregister_class(B2REACT_OT_ParentToEmpty)
# bpy.utils.unregister_class(R3F_OT_ExportAll_GLB)
bpy.utils.unregister_class(B2REACT_OT_Export_Active_GLB)
# Unregister Globals
bpy.utils.unregister_class(B2REACT_Globals)
del bpy.types.Scene.Blender2React
if __name__ == "__main__":
register()