goat3d

view exporters/blendgoat/src/blendgoat.py @ 35:4f8383183d62

renamed goatblender to blendgoat added goatanimfmt animation file format description
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 05 Oct 2013 21:19:10 +0300
parents exporters/goatblender/src/goatblender.py@f43f4849c86a
children 9a211986a28b
line source
1 # Goat3D Blender >2.5 exporter
2 import bpy;
3 from bpy_extras.io_utils import ExportHelper
5 bl_info = {
6 "name": "Goat3D scene",
7 "author": "John Tsiombikas",
8 "version": (0, 1),
9 "location": "File > Import-Export",
10 "description": "Mutant Stargoat, Goat3D scene file format: http://code.google.com/p/goat3d/",
11 "category": "Import-Export"
12 }
14 class ExportGoat3D(bpy.types.Operator, ExportHelper):
15 bl_idname = "export.goat3d"
16 bl_label = "Goat3D scene export"
18 fname = bpy.props.Stringproperty(subtype="FILE_PATH")
20 @classmethod
21 def poll(cls, ctx):
22 return ctx.object is not None
24 def execute(self, context):
25 file = open(self.filepath, "w")
26 file.write("foobar " + ctx.object.name)
27 return {'FINISHED'}
29 def menu_func(self, ctx):
30 self.layout.operator_context = 'INVOKE_DEFAULT'
31 self.layout.operator(ExportGoat3D.bl_idname, text="Goat3D scene export")
33 def register():
34 bpy.utils.register_module(__name__)
35 bpy.types.INFO_MT_file_export.append(menu_func)
37 def unregister():
38 bpy.utils.unregister_module(__name__)
39 bpy.types.INFO_MT_file_export.remove(menu_func)
41 if __name__ == "__main__":
42 register()