mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Use .3mf on MacOS as project extension
CURA-3886
This commit is contained in:
parent
d531d85aa2
commit
6ba2764efc
2 changed files with 9 additions and 2 deletions
|
@ -16,7 +16,7 @@ from UM.Platform import Platform
|
||||||
catalog = i18nCatalog("cura")
|
catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
def getMetaData() -> Dict:
|
def getMetaData() -> Dict:
|
||||||
# Workarround for osx not supporting double file extensions correclty.
|
# Workarround for osx not supporting double file extensions correctly.
|
||||||
if Platform.isOSX():
|
if Platform.isOSX():
|
||||||
workspace_extension = "3mf"
|
workspace_extension = "3mf"
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -10,10 +10,17 @@ except ImportError:
|
||||||
from . import ThreeMFWorkspaceWriter
|
from . import ThreeMFWorkspaceWriter
|
||||||
|
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
|
from UM.Platform import Platform
|
||||||
|
|
||||||
i18n_catalog = i18nCatalog("uranium")
|
i18n_catalog = i18nCatalog("uranium")
|
||||||
|
|
||||||
def getMetaData():
|
def getMetaData():
|
||||||
|
# Workarround for osx not supporting double file extensions correctly.
|
||||||
|
if Platform.isOSX():
|
||||||
|
workspace_extension = "3mf"
|
||||||
|
else:
|
||||||
|
workspace_extension = "curaproject.3mf"
|
||||||
|
|
||||||
metaData = {
|
metaData = {
|
||||||
"plugin": {
|
"plugin": {
|
||||||
"name": i18n_catalog.i18nc("@label", "3MF Writer"),
|
"name": i18n_catalog.i18nc("@label", "3MF Writer"),
|
||||||
|
@ -35,7 +42,7 @@ def getMetaData():
|
||||||
}
|
}
|
||||||
metaData["workspace_writer"] = {
|
metaData["workspace_writer"] = {
|
||||||
"output": [{
|
"output": [{
|
||||||
"extension": "curaproject.3mf",
|
"extension": workspace_extension,
|
||||||
"description": i18n_catalog.i18nc("@item:inlistbox", "Cura Project 3MF file"),
|
"description": i18n_catalog.i18nc("@item:inlistbox", "Cura Project 3MF file"),
|
||||||
"mime_type": "application/x-curaproject+xml",
|
"mime_type": "application/x-curaproject+xml",
|
||||||
"mode": ThreeMFWorkspaceWriter.ThreeMFWorkspaceWriter.OutputMode.BinaryMode
|
"mode": ThreeMFWorkspaceWriter.ThreeMFWorkspaceWriter.OutputMode.BinaryMode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue