forked from mitsuba-renderer/mitsuba-blender
-
Notifications
You must be signed in to change notification settings - Fork 1
/
__init__.py
43 lines (33 loc) · 1.21 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
bl_info = {
"name": "Mitsuba2-Blender",
"author": "Baptiste Nicolet",
"version": (0, 1),
"blender": (2, 80, 0),
"category": "Exporter",
"location": "File > Export > Mitsuba 2",
"description": "Mitsuba2 export for Blender",
"warning": "alpha0",
"support": "TESTING"
}
import sys
import bpy
from .export import MitsubaFileExport, MitsubaPrefs
from .imp import MitsubaFileImport
def menu_func(self, context):
self.layout.operator(MitsubaFileExport.bl_idname, text="Mitsuba 2 (.xml)")
def menu_func_import(self, context):
self.layout.operator(MitsubaFileImport.bl_idname, text="Mitsuba 2 (.xml)")
def register():
bpy.utils.register_class(MitsubaPrefs)
bpy.utils.register_class(MitsubaFileExport)
bpy.types.TOPBAR_MT_file_export.append(menu_func)
bpy.utils.register_class(MitsubaFileImport)
bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
def unregister():
bpy.utils.unregister_class(MitsubaFileExport)
bpy.types.TOPBAR_MT_file_export.remove(menu_func)
bpy.utils.unregister_class(MitsubaFileImport)
bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
bpy.utils.unregister_class(MitsubaPrefs)
if __name__ == '__main__':
register()