diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.py b/plugins/PostProcessingPlugin/PostProcessingPlugin.py index 845ad45341..fbb4214021 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.py +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.py @@ -139,22 +139,28 @@ class PostProcessingPlugin(QObject, Extension): if self._loaded_scripts: # Already loaded. return - # The PostProcessingPlugin path is for built-in scripts. - # The Resources path is where the user should store custom scripts. - # The Preferences path is legacy, where the user may previously have stored scripts. - resource_folders = [PluginRegistry.getInstance().getPluginPath("PostProcessingPlugin"), Resources.getStoragePath(Resources.Preferences)] - resource_folders.extend(Resources.getAllPathsForType(Resources.Resources)) - for root in resource_folders: - if root is None: - continue - path = os.path.join(root, "scripts") + # Make sure a "scripts" folder exists in the main configuration folder and the preferences folder. + # On some platforms the resources and preferences folders resolve to the same folder, + # but on Linux they can be different. + for path in set([os.path.join(Resources.getStoragePath(r), "scripts") for r in [Resources.Resources, Resources.Preferences]]): if not os.path.isdir(path): try: os.makedirs(path) except OSError: Logger.log("w", "Unable to create a folder for scripts: " + path) - continue + # The PostProcessingPlugin path is for built-in scripts. + # The Resources path is where the user should store custom scripts. + # The Preferences path is legacy, where the user may previously have stored scripts. + resource_folders = [PluginRegistry.getInstance().getPluginPath("PostProcessingPlugin"), Resources.getStoragePath(Resources.Preferences)] + resource_folders.extend(Resources.getAllPathsForType(Resources.Resources)) + + for root in resource_folders: + if root is None: + continue + path = os.path.join(root, "scripts") + if not os.path.isdir(path): + continue self.loadScripts(path) def loadScripts(self, path: str) -> None: diff --git a/resources/definitions/ultimaker_s3.def.json b/resources/definitions/ultimaker_s3.def.json index 61652b23a6..0cf31c7f66 100644 --- a/resources/definitions/ultimaker_s3.def.json +++ b/resources/definitions/ultimaker_s3.def.json @@ -9,7 +9,11 @@ "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-ufp;text/x-gcode", "platform": "ultimaker_s3_platform.obj", - "bom_numbers": [213482, 213483], + "bom_numbers": [ + 213482, + 213483, + 213484 + ], "exclude_materials": [ "generic_hips", "generic_petg", diff --git a/resources/definitions/ultimaker_s5.def.json b/resources/definitions/ultimaker_s5.def.json index 44ca7d7018..8bb086a654 100644 --- a/resources/definitions/ultimaker_s5.def.json +++ b/resources/definitions/ultimaker_s5.def.json @@ -12,7 +12,8 @@ "bom_numbers": [ 9051, 214475, - 214476 + 214476, + 214477 ], "firmware_update_info": { diff --git a/resources/definitions/ultimaker_s7.def.json b/resources/definitions/ultimaker_s7.def.json index a996e00f72..16a36eefc2 100644 --- a/resources/definitions/ultimaker_s7.def.json +++ b/resources/definitions/ultimaker_s7.def.json @@ -9,12 +9,10 @@ "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-ufp;text/x-gcode", "platform": "ultimaker_s7_platform.obj", - "bom_numbers": [ - 5078167 - ], + "bom_numbers": [5078167, 5078168], "firmware_update_info": { - "check_urls": [ "https://software.ultimaker.com/releases/firmware/9051/stable/um-update.swu.version" ], + "check_urls": [ "https://software.ultimaker.com/releases/firmware/5078167/stable/um-update.swu.version" ], "id": 5078167, "update_url": "https://ultimaker.com/firmware?utm_source=cura&utm_medium=software&utm_campaign=fw-update" },