Skip to content

Commit

Permalink
Merge pull request #18579 from Ultimaker/CURA-11715-reenter-mimetype-…
Browse files Browse the repository at this point in the history
…for-ucp

Mimetype introduction for ucp
  • Loading branch information
wawanbreton authored Mar 12, 2024
2 parents 5824cf5 + b06805d commit e8e106b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/3MFWriter/UCPDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def save3mf(self):
device.requestWrite(
nodes,
file_name,
["application/vnd.ms-package.3dmanufacturing-3dmodel+xml"],
["application/x-ucp"],
workspace_handler,
preferred_mimetype_list="application/vnd.ms-package.3dmanufacturing-3dmodel+xml"
preferred_mimetype_list="application/x-ucp"
)
except OutputDeviceError.UserCanceledError:
self._onRejected()
Expand Down
14 changes: 13 additions & 1 deletion plugins/3MFWriter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,28 @@ def getMetaData():
"description": i18n_catalog.i18nc("@item:inlistbox", "3MF file"),
"mime_type": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml",
"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
}
]
}
metaData["workspace_writer"] = {
"output": [
{
"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",
"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
}
]
}
Expand Down

0 comments on commit e8e106b

Please sign in to comment.