Merge pull request #18579 from Ultimaker/CURA-11715-reenter-mimetype-for-ucp

Mimetype introduction for ucp
This commit is contained in:
Erwan MATHIEU 2024-03-12 16:42:12 +01:00 committed by GitHub
commit e8e106b9e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 3 deletions

View File

@ -75,9 +75,9 @@ class UCPDialog(QObject):
device.requestWrite( device.requestWrite(
nodes, nodes,
file_name, file_name,
["application/vnd.ms-package.3dmanufacturing-3dmodel+xml"], ["application/x-ucp"],
workspace_handler, workspace_handler,
preferred_mimetype_list="application/vnd.ms-package.3dmanufacturing-3dmodel+xml" preferred_mimetype_list="application/x-ucp"
) )
except OutputDeviceError.UserCanceledError: except OutputDeviceError.UserCanceledError:
self._onRejected() self._onRejected()

View File

@ -32,6 +32,12 @@ def getMetaData():
"description": i18n_catalog.i18nc("@item:inlistbox", "3MF file"), "description": i18n_catalog.i18nc("@item:inlistbox", "3MF file"),
"mime_type": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml", "mime_type": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml",
"mode": ThreeMFWriter.ThreeMFWriter.OutputMode.BinaryMode "mode": ThreeMFWriter.ThreeMFWriter.OutputMode.BinaryMode
},
{
"extension": "3mf",
"description": i18n_catalog.i18nc("@item:inlistbox", "Universal Cura Project"),
"mime_type": "application/x-ucp",
"mode": ThreeMFWriter.ThreeMFWriter.OutputMode.BinaryMode
} }
] ]
} }
@ -39,9 +45,15 @@ def getMetaData():
"output": [ "output": [
{ {
"extension": workspace_extension, "extension": workspace_extension,
"description": i18n_catalog.i18nc("@item:inlistbox", "3MF Project file"), "description": i18n_catalog.i18nc("@item:inlistbox", "Cura Project 3MF file"),
"mime_type": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml", "mime_type": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml",
"mode": ThreeMFWorkspaceWriter.ThreeMFWorkspaceWriter.OutputMode.BinaryMode "mode": ThreeMFWorkspaceWriter.ThreeMFWorkspaceWriter.OutputMode.BinaryMode
},
{
"extension": "3mf",
"description": i18n_catalog.i18nc("@item:inlistbox", "Universal Cura Project"),
"mime_type": "application/x-ucp",
"mode": ThreeMFWorkspaceWriter.ThreeMFWorkspaceWriter.OutputMode.BinaryMode
} }
] ]
} }