X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspmath%2F__init__.py;fp=blender%2Fio_mspmath%2F__init__.py;h=1490ce6e7cb664547377a3db3af5df0749cc964d;hb=1df02cf6bf187dfc8f0afe9223dd0f4cbb90b559;hp=0000000000000000000000000000000000000000;hpb=0aaef0b1fd412875137937f9e58ccb480c304be8;p=libs%2Fmath.git diff --git a/blender/io_mspmath/__init__.py b/blender/io_mspmath/__init__.py new file mode 100644 index 0000000..1490ce6 --- /dev/null +++ b/blender/io_mspmath/__init__.py @@ -0,0 +1,48 @@ +bl_info = { + "name": "Msp math datafiles", + "author": "Mikko Rasa", + "location": "File > Export", + "description": "Export Msp math data", + "category": "Import-Export" } + +if "bpy" in locals(): + import imp + for sub in "export_shape", "outfile", "properties": + if sub in locals(): + imp.reload(locals()[sub]) + +import bpy +from bpy_extras.io_utils import ExportHelper + +class ExportMspMathShape(bpy.types.Operator, ExportHelper): + bl_idname = "export_mesh.mspmath_shape" + bl_label = "Export Msp math shape" + + filename_ext = ".shape" + + def execute(self, context): + from .export_shape import ShapeExporter + exporter = ShapeExporter() + exporter.export(context, self.filepath) + return {"FINISHED"} + +def menu_func_export(self, context): + self.layout.operator(ExportMspMathShape.bl_idname, text="Msp math shape") + +from .properties import MspMathObjectProperties + +def register(): + bpy.utils.register_module(__name__) + + bpy.types.INFO_MT_file_export.append(menu_func_export) + + from .properties import register_properties + register_properties(); + +def unregister(): + bpy.utils.unregister_module(__name__) + + bpy.types.INFO_MT_file_export.remove(menu_func_export) + +if __name__=="__main__": + register()