mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
1 changed files with 32 additions and 29 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue