Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostas Karmas <konskarm@gmail.com>2020-08-11 13:37:34 +0300
committerKostas Karmas <konskarm@gmail.com>2020-08-11 13:37:34 +0300
commit01d5e846aa62c12a709f91d66df54f029f4bf323 (patch)
tree7014285983fc96bf5fd6858380934c18d18533f3 /plugins/3MFReader
parent0feeccff85c586f5983054e48490404d966db7b5 (diff)
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
Diffstat (limited to 'plugins/3MFReader')
-rwxr-xr-xplugins/3MFReader/ThreeMFWorkspaceReader.py4
1 files changed, 4 insertions, 0 deletions
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."