nuclear@38: bl_info = { nuclear@38: "name": "Goat3D scene", nuclear@38: "author": "John Tsiombikas", nuclear@38: "version": (0, 1), nuclear@39: "blender": (2, 63, 0), nuclear@38: "location": "File > Import-Export", nuclear@38: "description": "Mutant Stargoat, Goat3D scene file format: http://code.google.com/p/goat3d/", nuclear@38: "category": "Import-Export" nuclear@38: } nuclear@38: nuclear@38: if "bpy" in locals(): nuclear@38: import imp nuclear@38: if "export_goat" in locals(): nuclear@38: imp.reload(export_goat) nuclear@38: nuclear@38: import bpy nuclear@38: from bpy_extras.io_utils import ExportHelper nuclear@38: nuclear@38: class ExportGoat3D(bpy.types.Operator, ExportHelper): nuclear@38: bl_idname = "export_scene.goat3d" nuclear@38: bl_label = "Export Goat3D Scene" nuclear@38: bl_options = {'PRESET'} nuclear@38: filename_ext = ".goatsce" nuclear@38: filter_glob = bpy.props.StringProperty(default="*.goatsce", options={'HIDDEN'}) nuclear@38: nuclear@38: def execute(self, ctx): nuclear@38: from . import export_goat nuclear@38: if not export_goat.export(self, ctx, self.filepath): nuclear@38: return {'CANCELLED'} nuclear@38: return {'FINISHED'} nuclear@38: nuclear@38: def menu_func(self, ctx): nuclear@38: self.layout.operator_context = 'INVOKE_DEFAULT' nuclear@38: self.layout.operator(ExportGoat3D.bl_idname, text="Goat3D scene export (.goatsce)") nuclear@38: nuclear@38: def register(): nuclear@38: bpy.utils.register_module(__name__) nuclear@38: bpy.types.INFO_MT_file_export.append(menu_func) nuclear@38: nuclear@38: def unregister(): nuclear@38: bpy.utils.unregister_module(__name__) nuclear@38: bpy.types.INFO_MT_file_export.remove(menu_func) nuclear@38: nuclear@38: if __name__ == "__main__": nuclear@38: register()