mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-21 20:19:32 +08:00
Only create new extruder stack for single extrusion machine if it does not exist yet - CURA-4482
This commit is contained in:
parent
e7f1900f71
commit
f20ba4a118
@ -406,13 +406,16 @@ class CuraContainerRegistry(ContainerRegistry):
|
||||
|
||||
def _addExtruderStackForSingleExtrusionMachine(self, machine, extruder_id):
|
||||
new_extruder_id = extruder_id
|
||||
extruder_stack = None
|
||||
|
||||
# if extruders are defined in the machine definition use those instead
|
||||
if machine.extruders and len(machine.extruders) > 0:
|
||||
new_extruder_id = machine.extruders["0"].getId()
|
||||
extruder_stack = machine.extruders["0"]
|
||||
|
||||
# if the extruder stack doesn't exist yet we create and add it
|
||||
if not extruder_stack:
|
||||
extruder_definitions = self.findDefinitionContainers(id = new_extruder_id)
|
||||
|
||||
if not extruder_definitions:
|
||||
Logger.log("w", "Could not find definition containers for extruder %s", new_extruder_id)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user