X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=blender%2Fio_mesh_mspgl%2F__init__.py;h=c6d250fb87061d9d9665b54a5281c810f96b8add;hb=6abd9639c56e263c92d1ccc4f772d7f0fca5ce6a;hp=5ff3b4bc93e30cf635cb7d31e26bf87af2394df7;hpb=203ef7534bcbb98b2cddfe9a52128134e46d4133;p=libs%2Fgl.git diff --git a/blender/io_mesh_mspgl/__init__.py b/blender/io_mesh_mspgl/__init__.py index 5ff3b4bc..c6d250fb 100644 --- a/blender/io_mesh_mspgl/__init__.py +++ b/blender/io_mesh_mspgl/__init__.py @@ -1,8 +1,21 @@ +bl_info = { + "name": "Msp GL format", + "author": "Mikko Rasa", + "location": "File > Export", + "description": "Export Msp GL meshes and objects", + "category": "Import-Export" } + +if "bpy" in locals(): + import imp + for sub in "export_mspgl", "mesh", "util": + if sub in locals(): + imp.reload(locals()[sub]) + import bpy -from io_utils import ExportHelper +from bpy_extras.io_utils import ExportHelper class ExportMspGL(bpy.types.Operator, ExportHelper): - bl_idname = "export.mspgl" + bl_idname = "export_mesh.mspgl" bl_label = "Export Msp GL data" filename_ext = ".mesh" @@ -39,7 +52,14 @@ def menu_func_export(self, context): self.layout.operator(ExportMspGL.bl_idname, text="Msp GL") def register(): + bpy.utils.register_module(__name__) + bpy.types.INFO_MT_file_export.append(menu_func_export) +def unregister(): + bpy.utils.unregister_module(__name__) + + bpy.types.INFO_MT_file_export.remove(menu_func_export) + if __name__=="__main__": register()