+class ExportMspGLProject(bpy.types.Operator):
+ bl_idname = "export.mspgl_project"
+ bl_label = "Export Msp GL project"
+ bl_description = "Export the entire project in Msp GL format"
+
+ directory: bpy.props.StringProperty(name="Directory", description="Directory for exporting the data", subtype='FILE_PATH')
+
+ def invoke(self, context, event):
+ blend_filepath = context.blend_data.filepath
+ if blend_filepath:
+ self.directory = os.path.split(blend_filepath)[0]
+ context.window_manager.fileselect_add(self)
+ return {'RUNNING_MODAL'}
+
+ def execute(self, context):
+ from .export import ProjectExporter
+ exporter = ProjectExporter()
+ exporter.export_to_directory(context, self.directory)
+ return {'FINISHED'}
+