This repository has been archived by the owner on Feb 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
__init__.py
57 lines (48 loc) · 2.12 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
#Ported to blender from "MT Framework tools" https://www.dropbox.com/s/4ufvrgkdsioe3a6/MT%20Framework.mzp?dl=0
#(https://lukascone.wordpress.com/2017/06/18/mt-framework-tools/)
from .dbg import dbg_init
dbg_init()
content=bytes("","UTF-8")
bl_info = {
"name": "MHW Model importer",
"category": "Import-Export",
"author": "CrazyT",
"location": "File > Import",
"version": "{VERSION}",
"warning": "commit {COMMIT}"
}
# no blender imports here ... else basic tests won't work!
def register():
import bpy
from .operators.mhw_model_gui import ImportMOD3
from .operators.mhw_model_gui import ExportMOD3
from .operators.mhw_model_gui import menu_func_import as mhw_model_menu_func_import
from .operators.mhw_model_gui import menu_func_export as mhw_model_menu_func_export
from .operators.mhw_texture import menu_func_import as mhw_texture_menu_func_export
from .operators.mhw_texture import ImportTEX
bpy.utils.register_class(ImportMOD3)
bpy.utils.register_class(ExportMOD3)
bpy.utils.register_class(ImportTEX)
bpy.types.INFO_MT_file_import.append(mhw_model_menu_func_import)
bpy.types.INFO_MT_file_export.append(mhw_model_menu_func_export)
bpy.types.INFO_MT_file_import.append(mhw_texture_menu_func_export)
def unregister():
import bpy
from .operators.mhw_model_gui import ImportMOD3
from .operators.mhw_model_gui import ExportMOD3
from .operators.mhw_model_gui import menu_func_import as mhw_model_menu_func_import
from .operators.mhw_model_gui import menu_func_export as mhw_model_menu_func_export
from .operators.mhw_texture import menu_func_import as mhw_texture_menu_func_export
from .operators.mhw_texture import ImportTEX
bpy.utils.unregister_class(ImportMOD3)
bpy.utils.unregister_class(ExportMOD3)
bpy.utils.unregister_class(ImportTEX)
bpy.types.INFO_MT_file_import.remove(mhw_model_menu_func_import)
bpy.types.INFO_MT_file_export.remove(mhw_model_menu_func_export)
bpy.types.INFO_MT_file_import.remove(mhw_texture_menu_func_export)
if __name__ == "__main__":
try:
unregister()
except:
pass
register()