mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Create extruder stack for single extrusion machines when adding new machine - CURA-4482
This commit is contained in:
parent
9806ec7374
commit
f36c9ffbc0
4 changed files with 37 additions and 21 deletions
|
@ -193,6 +193,7 @@ class ExtruderManager(QObject):
|
|||
if global_container_stack.getId() in self._extruder_trains:
|
||||
if str(self._active_extruder_index) in self._extruder_trains[global_container_stack.getId()]:
|
||||
return self._extruder_trains[global_container_stack.getId()][str(self._active_extruder_index)]
|
||||
|
||||
return None
|
||||
|
||||
## Get an extruder stack by index
|
||||
|
@ -435,6 +436,10 @@ class ExtruderManager(QObject):
|
|||
|
||||
scene_root = Application.getInstance().getController().getScene().getRoot()
|
||||
|
||||
# If no extruders are registered in the extruder manager yet, return an empty array
|
||||
if len(self.extruderIds) == 0:
|
||||
return []
|
||||
|
||||
# Get the extruders of all printable meshes in the scene
|
||||
meshes = [node for node in DepthFirstIterator(scene_root) if type(node) is SceneNode and node.isSelectable()]
|
||||
for mesh in meshes:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue