mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Fix another open-file resulting in a crash.
If the materials doesn't have the right key in it, just continue. It should be somewhere after all. part of CURA-11772
This commit is contained in:
parent
e85e50cce4
commit
93861073d3
1 changed files with 4 additions and 1 deletions
|
@ -1240,7 +1240,10 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
root_material_id = extruder_info.root_material_id
|
||||
root_material_id = self._old_new_materials.get(root_material_id, root_material_id)
|
||||
|
||||
material_node = machine_node.variants[extruder_stack.variant.getName()].materials[root_material_id]
|
||||
available_materials = machine_node.variants[extruder_stack.variant.getName()].materials
|
||||
if root_material_id not in available_materials:
|
||||
continue
|
||||
material_node = available_materials[root_material_id]
|
||||
extruder_stack.material = material_node.container
|
||||
|
||||
def _clearMachineSettings(self, global_stack, extruder_stack_dict):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue