goat3d

view exporters/blendgoat/src/__init__.py @ 69:66cd8266f078

fixed animation export
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 21 Apr 2014 03:44:10 +0300
parents 60f2037680ee
children
line source
1 bl_info = {
2 "name": "Goat3D scene",
3 "author": "John Tsiombikas",
4 "version": (0, 1),
5 "blender": (2, 63, 0),
6 "location": "File > Import-Export",
7 "description": "Mutant Stargoat, Goat3D scene file format: http://code.google.com/p/goat3d/",
8 "category": "Import-Export"
9 }
11 if "bpy" in locals():
12 import imp
13 if "export_goat" in locals():
14 imp.reload(export_goat)
16 import bpy
17 from bpy_extras.io_utils import ExportHelper
19 class ExportGoat3D(bpy.types.Operator, ExportHelper):
20 bl_idname = "export_scene.goat3d"
21 bl_label = "Export Goat3D Scene"
22 bl_options = {'PRESET'}
23 filename_ext = ".goatsce"
24 filter_glob = bpy.props.StringProperty(default="*.goatsce", options={'HIDDEN'})
26 def execute(self, ctx):
27 from . import export_goat
28 if not export_goat.export(self, ctx, self.filepath):
29 return {'CANCELLED'}
30 return {'FINISHED'}
32 def menu_func(self, ctx):
33 self.layout.operator_context = 'INVOKE_DEFAULT'
34 self.layout.operator(ExportGoat3D.bl_idname, text="Goat3D scene export (.goatsce)")
36 def register():
37 bpy.utils.register_module(__name__)
38 bpy.types.INFO_MT_file_export.append(menu_func)
40 def unregister():
41 bpy.utils.unregister_module(__name__)
42 bpy.types.INFO_MT_file_export.remove(menu_func)
44 if __name__ == "__main__":
45 register()