From 73e4d7873588c1af823723c5d7be15eb032c16fb Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Thu, 14 Mar 2024 13:01:01 +0100 Subject: [PATCH 1/2] added limit mimetype for 3mf project and removed saving ucp as mesh writer CURA-11715 --- plugins/3MFWriter/__init__.py | 6 ------ resources/qml/Menus/FileMenu.qml | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/3MFWriter/__init__.py b/plugins/3MFWriter/__init__.py index 1cecf4c3f8..980aefdf85 100644 --- a/plugins/3MFWriter/__init__.py +++ b/plugins/3MFWriter/__init__.py @@ -33,12 +33,6 @@ def getMetaData(): "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"] = { diff --git a/resources/qml/Menus/FileMenu.qml b/resources/qml/Menus/FileMenu.qml index 5d252a32ba..9589a9da34 100644 --- a/resources/qml/Menus/FileMenu.qml +++ b/resources/qml/Menus/FileMenu.qml @@ -51,6 +51,7 @@ Cura.Menu "filter_by_machine": false, "file_type": "workspace", "preferred_mimetypes": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml", + "limit_mimetypes":["application/vnd.ms-package.3dmanufacturing-3dmodel+xml"], }; if (UM.Preferences.getValue("cura/dialog_on_project_save")) { From e0f5d2595c3196e4a654f01c2b788084064d6231 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 14 Mar 2024 18:45:40 +0100 Subject: [PATCH 2/2] Only save project as project (not ucp). If we don't limit this, the user would also have the basically fake option to save as UCP ... which would still save as a workspace/project instead, leading to much confusion. (This is the 2nd instance of where this needs to go actually...) part of CURA-11715 --- resources/qml/Menus/SaveProjectMenu.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/qml/Menus/SaveProjectMenu.qml b/resources/qml/Menus/SaveProjectMenu.qml index 2140d5e0ef..cd2b82daeb 100644 --- a/resources/qml/Menus/SaveProjectMenu.qml +++ b/resources/qml/Menus/SaveProjectMenu.qml @@ -28,7 +28,12 @@ Cura.Menu // Prevent shortcut triggering if the item is disabled! return } - var args = { "filter_by_machine": false, "file_type": "workspace", "preferred_mimetypes": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml" }; + var args = { + "filter_by_machine": false, + "file_type": "workspace", + "preferred_mimetypes": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml", + "limit_mimetypes": ["application/vnd.ms-package.3dmanufacturing-3dmodel+xml"], + }; if (UM.Preferences.getValue("cura/dialog_on_project_save")) { saveWorkspaceDialog.deviceId = model.id