From 01d5e846aa62c12a709f91d66df54f029f4bf323 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Tue, 11 Aug 2020 12:37:34 +0200 Subject: [PATCH] Document possible theoretical issue when loading a project file The issue will happen only if the machine_extruder_count is a formula. In this case, the project loading will not work properly if "Create new" printer is selected, as the settings of all extruders but the first one will not be applied. Workaround in this case will be to load the project again and select to update the existing printer, in which case all settings will load properly. CURA-7646 --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index 0c1bd0a9a2..6ed35fe72c 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -939,6 +939,10 @@ class ThreeMFWorkspaceReader(WorkspaceReader): and "values" in self._machine_info.definition_changes_info.parser \ and "machine_extruder_count" in self._machine_info.definition_changes_info.parser["values"]: try: + # Theoretically, if the machine_extruder_count is a setting formula (e.g. "=3"), this will produce a + # value error and the project file loading will load the settings in the first extruder only. + # This is not expected to happen though, since all machine definitions define the machine_extruder_count + # as an integer. machine_extruder_count = int(self._machine_info.definition_changes_info.parser["values"]["machine_extruder_count"]) except ValueError: Logger.log("w", "'machine_extruder_count' in file '{file_name}' is not a number."