From 6ba2764efc41b3a773c952c73667d96ab2faba43 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 30 May 2017 09:57:41 +0200 Subject: [PATCH] Use .3mf on MacOS as project extension CURA-3886 --- plugins/3MFReader/__init__.py | 2 +- plugins/3MFWriter/__init__.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/3MFReader/__init__.py b/plugins/3MFReader/__init__.py index 6e3e5aa918..7453c8cb0a 100644 --- a/plugins/3MFReader/__init__.py +++ b/plugins/3MFReader/__init__.py @@ -16,7 +16,7 @@ from UM.Platform import Platform catalog = i18nCatalog("cura") def getMetaData() -> Dict: - # Workarround for osx not supporting double file extensions correclty. + # Workarround for osx not supporting double file extensions correctly. if Platform.isOSX(): workspace_extension = "3mf" else: diff --git a/plugins/3MFWriter/__init__.py b/plugins/3MFWriter/__init__.py index 09bf06749e..b811fb41b5 100644 --- a/plugins/3MFWriter/__init__.py +++ b/plugins/3MFWriter/__init__.py @@ -10,10 +10,17 @@ except ImportError: from . import ThreeMFWorkspaceWriter from UM.i18n import i18nCatalog +from UM.Platform import Platform i18n_catalog = i18nCatalog("uranium") def getMetaData(): + # Workarround for osx not supporting double file extensions correctly. + if Platform.isOSX(): + workspace_extension = "3mf" + else: + workspace_extension = "curaproject.3mf" + metaData = { "plugin": { "name": i18n_catalog.i18nc("@label", "3MF Writer"), @@ -35,7 +42,7 @@ def getMetaData(): } metaData["workspace_writer"] = { "output": [{ - "extension": "curaproject.3mf", + "extension": workspace_extension, "description": i18n_catalog.i18nc("@item:inlistbox", "Cura Project 3MF file"), "mime_type": "application/x-curaproject+xml", "mode": ThreeMFWorkspaceWriter.ThreeMFWorkspaceWriter.OutputMode.BinaryMode