Added FBX Export
This commit is contained in:
+18
-1
@@ -49,12 +49,15 @@ class AVATAR_TOOLKIT_OT_import_menu(bpy.types.Operator):
|
||||
layout.operator("avatar_toolkit.import_pmd", text="Import PMD")
|
||||
layout.operator("avatar_toolkit.import_fbx", text="Import FBX")
|
||||
|
||||
|
||||
@register_wrap
|
||||
class AVATAR_TOOLKIT_OT_export_menu(bpy.types.Operator):
|
||||
bl_idname = "avatar_toolkit.export_menu"
|
||||
bl_label = "Export Menu"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return any(obj.type == 'MESH' for obj in context.scene.objects)
|
||||
|
||||
def execute(self, context: Context):
|
||||
return {'FINISHED'}
|
||||
|
||||
@@ -66,6 +69,7 @@ class AVATAR_TOOLKIT_OT_export_menu(bpy.types.Operator):
|
||||
layout = self.layout
|
||||
layout.label(text="Select Export Method")
|
||||
layout.operator("avatar_toolkit.export_resonite", text="Export Resonite")
|
||||
layout.operator("avatar_toolkit.export_fbx", text="Export FBX")
|
||||
|
||||
@register_wrap
|
||||
class AVATAR_TOOLKIT_OT_import_pmx(bpy.types.Operator):
|
||||
@@ -111,3 +115,16 @@ class AVATAR_TOOLKIT_OT_import_fbx(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
context.window_manager.fileselect_add(self)
|
||||
return {'RUNNING_MODAL'}
|
||||
|
||||
@register_wrap
|
||||
class AVATAR_TOOLKIT_OT_export_fbx(bpy.types.Operator):
|
||||
bl_idname = 'avatar_toolkit.export_fbx'
|
||||
bl_label = "Export FBX"
|
||||
bl_description = "Export the model as FBX"
|
||||
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
|
||||
|
||||
def execute(self, context):
|
||||
bpy.ops.export_scene.fbx('INVOKE_DEFAULT')
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user