if self.collection:
col.prop(self, "skip_existing")
+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'}
+
class AddUniform(bpy.types.Operator):
bl_idname = "material.add_uniform"
bl_label = "Add Uniform"
self.layout.operator(ExportMspGLData.bl_idname, text="Msp GL data")
self.layout.operator(ExportMspGLAnimation.bl_idname, text="Msp GL animation")
self.layout.operator(ExportMspGLScene.bl_idname, text="Msp GL scene")
+ self.layout.operator(ExportMspGLProject.bl_idname, text="Msp GL project")
-classes = [ExportMspGLData, ExportMspGLAnimation, ExportMspGLScene, AddUniform, RemoveUniform]
+classes = [ExportMspGLData, ExportMspGLAnimation, ExportMspGLScene, ExportMspGLProject, AddUniform, RemoveUniform]
def register():
for c in classes: