mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 18:09:02 +08: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
@ -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…
x
Reference in New Issue
Block a user