+class ExportMspGLAnimation(bpy.types.Operator, ExportMspGLBase):
+ bl_idname = "export.mspgl_animation"
+ bl_label = "Export Msp GL animation"
+ bl_description = "Export one or more animations in Msp GL format"
+
+ filename_ext = ".anim"
+
+ export_all: bpy.props.BoolProperty(name="Export all animations", description="Export all animations present on the selected objects' NLA tracks")
+ collection: bpy.props.BoolProperty(name="As a collection", description="Export the animations as a single collection file", default=True)
+ looping_threshold: bpy.props.FloatProperty(name="Looping threshold", description="Tolerance for curve beginning and end values for looping", min=0.0, soft_max=1.0, precision=4, default=0.001)
+
+ def check(self, context):
+ ext_changed = self.set_extension(".mdc" if self.export_all and self.collection else ".anim")
+ super_result = super().check(context)
+ return ext_changed or super_result
+
+ def create_exporter(self):
+ from .export_animation import AnimationExporter
+ return AnimationExporter()
+
+ def draw(self, context):
+ col = self.layout.column()
+ col.prop(self, "export_all")
+ if self.export_all:
+ col.prop(self, "collection")
+ col.prop(self, "looping_threshold")
+
+class ExportMspGLScene(bpy.types.Operator, ExportMspGLBase):
+ bl_idname = "export_scene.mspgl_scene"
+ bl_label = "Export Msp GL scene"
+ bl_description = "Export the active scene in Msp GL format"
+
+ filename_ext = ".scene"
+
+ selected_only: bpy.props.BoolProperty(name="Selected objects only", description="Only export the selected objects")
+ visible_collections: bpy.props.BoolProperty(name="Visible collections only", description="Only export objects in visible collections", default=True)
+ resource_collection: bpy.props.BoolProperty(name="Resource collection", description="Put resources to a single collection file", default=True)
+ skip_existing: bpy.props.BoolProperty(name="Skip existing files", description="Skip resources that already exist as files", default=True)
+
+ def create_exporter(self):
+ from .export_scene import SceneExporter
+ return SceneExporter()
+
+ def draw(self, context):
+ col = self.layout.column()
+ col.prop(self, "selected_only")
+ col.prop(self, "visible_collections")
+ col.prop(self, "resource_collection")
+ if self.resource_collection:
+ col.prop(self, "skip_existing")
+
+class ExportMspGLCamera(bpy.types.Operator, ExportMspGLBase):
+ bl_idname = "export.mspgl_camera"
+ bl_label = "Export Msp GL camera"
+ bl_description = "Export a camera in Msp GL format"
+
+ filename_ext = ".camera"
+
+ def create_exporter(self):
+ from .export_camera import CameraExporter
+ return CameraExporter()
+