mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Prevent crash if the variants only have an 'empty' entry.
Just get the one you'd get if no variant was asked (like in the other branch of the if) then. CURA-11772
This commit is contained in:
parent
d3b1294e8b
commit
bc5532dab3
1 changed files with 1 additions and 1 deletions
|
@ -1225,7 +1225,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
node = machine_node.variants.get(machine_node.preferred_variant_name, next(iter(machine_node.variants.values())))
|
||||
else:
|
||||
variant_name = extruder_info.variant_info.parser["general"]["name"]
|
||||
node = ContainerTree.getInstance().machines[global_stack.definition.getId()].variants[variant_name]
|
||||
node = ContainerTree.getInstance().machines[global_stack.definition.getId()].variants.get(variant_name, next(iter(machine_node.variants.values())))
|
||||
extruder_stack.variant = node.container
|
||||
|
||||
def _applyMaterials(self, global_stack, extruder_stack_dict):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue