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-03 15:54:44 +0300
committerKostas Karmas <konskarm@gmail.com>2020-08-03 17:20:44 +0300
commit949837f04160172d7e9d34d9673799247286ece3 (patch)
treeddb041e55a7949e6d7612f47059cb6303411c995 /plugins/3MFReader
parenta6d779e72284b4279d9956610eead861de5a80a2 (diff)
Fix crashing when opening project files without materials
Diffstat (limited to 'plugins/3MFReader')
-rwxr-xr-xplugins/3MFReader/ThreeMFWorkspaceReader.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py
index ec457e0a4b..411a78948b 100755
--- a/plugins/3MFReader/ThreeMFWorkspaceReader.py
+++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py
@@ -458,7 +458,6 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
position = parser["metadata"]["position"]
variant_id = parser["containers"][str(_ContainerIndexes.Variant)]
material_id = parser["containers"][str(_ContainerIndexes.Material)]
- materials_in_extruders_dict[position] = material_ids_to_names_map[reverse_material_id_dict[material_id]]
extruder_info = ExtruderInfo()
extruder_info.position = position
@@ -471,6 +470,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
if material_id not in ("empty", "empty_material"):
root_material_id = reverse_material_id_dict[material_id]
extruder_info.root_material_id = root_material_id
+ materials_in_extruders_dict[position] = material_ids_to_names_map[reverse_material_id_dict[material_id]]
definition_changes_id = parser["containers"][str(_ContainerIndexes.DefinitionChanges)]
if definition_changes_id not in ("empty", "empty_definition_changes"):