X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2F__init__.py;fp=blender%2Fio_mspgl%2F__init__.py;h=bcb196c3a87db1128cebec1f1045577b8a8dfa1f;hb=a25ac71f574649a95cf7f05f3ccad1b5d8ef2655;hp=a1869e3ecd74ee7ca2efb5e8c79477483c0c44b4;hpb=abe48249502a50f798d647cfa05a655379ea656b;p=libs%2Fgl.git diff --git a/blender/io_mspgl/__init__.py b/blender/io_mspgl/__init__.py index a1869e3e..bcb196c3 100644 --- a/blender/io_mspgl/__init__.py +++ b/blender/io_mspgl/__init__.py @@ -67,12 +67,17 @@ class ExportMspGLObject(bpy.types.Operator, ExportMspGLMeshBase): filename_ext = ".object" - single_file = bpy.props.BoolProperty(name="Single file", description="Write all data into a single file", default=True) + collection = bpy.props.BoolProperty(name="As a collection", description="Write all data into a single collection file", default=False) shared_resources = bpy.props.BoolProperty(name="Shared resources", description="Use global names for resource files to enable sharing", default=True) export_lods = bpy.props.BoolProperty(name="Export LoDs", description="Export all levels of detail", default=True) use_textures = bpy.props.BoolProperty(name="Use textures", description="Use textures in the exported object", default=True) + def check(self, context): + ext_changed = self.set_extension(".mdc" if self.collection else ".object") + super_result = super().check(context) + return ext_changed or super_result + def create_exporter(self): from .export_object import ObjectExporter return ObjectExporter() @@ -85,9 +90,8 @@ class ExportMspGLObject(bpy.types.Operator, ExportMspGLMeshBase): col = self.layout.column() col.label(text="Files") - col.prop(self, "single_file") - if not self.single_file: - col.prop(self, "shared_resources") + col.prop(self, "collection") + col.prop(self, "shared_resources") class ExportMspGLArmature(bpy.types.Operator, ExportMspGLBase): bl_idname = "export.mspgl_armature"