From d1e8ae1ca72ad12c51bfb6d53b53326d3efca701 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Mon, 1 Aug 2022 11:16:48 +0200 Subject: [PATCH] Fix curapackage intent and intents mappings Contributes to SD-3871 and CURA-7667 --- cura/CuraPackageManager.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 456aac97ac..a8f5b24a7b 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -55,9 +55,15 @@ class CuraPackageManager(PackageManager): def initialize(self) -> None: self._installation_dirs_dict["materials"] = Resources.getStoragePath(CuraApplication.ResourceTypes.MaterialInstanceContainer) self._installation_dirs_dict["qualities"] = Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer) - self._installation_dirs_dict["intents"] = Resources.getStoragePath(CuraApplication.ResourceTypes.IntentInstanceContainer) self._installation_dirs_dict["variants"] = Resources.getStoragePath(CuraApplication.ResourceTypes.VariantInstanceContainer) + # Due to a bug in Cura 5.1.0 we needed to change the directory structure of the curapackage on the server side (See SD-3871). + # Although the material intent profiles will be installed in the `intent` folder, the curapackage from the server side will + # have an `intents` folder. For completeness, we will look in both locations of in the curapackage and map them both to the + # `intent` folder. + self._installation_dirs_dict["intents"] = Resources.getStoragePath(CuraApplication.ResourceTypes.IntentInstanceContainer) + self._installation_dirs_dict["intent"] = Resources.getStoragePath(CuraApplication.ResourceTypes.IntentInstanceContainer) + super().initialize() def isMaterialBundled(self, file_name: str, guid: str):