mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Moved getAllExtruderValues to extruder manager
CURA-2407
This commit is contained in:
parent
e0109a1857
commit
0b6c196659
2 changed files with 15 additions and 13 deletions
|
@ -265,6 +265,19 @@ class ExtruderManager(QObject):
|
|||
|
||||
container_registry.addContainer(container_stack)
|
||||
|
||||
def getAllExtruderValues(self, setting_key):
|
||||
global_container_stack = UM.Application.getInstance().getGlobalContainerStack()
|
||||
multi_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1
|
||||
if not multi_extrusion:
|
||||
return [global_container_stack.getProperty(setting_key, "value")]
|
||||
|
||||
result = []
|
||||
for index in self.extruderIds:
|
||||
extruder_stack_id = self.extruderIds[str(index)]
|
||||
stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id=extruder_stack_id)[0]
|
||||
result.append(stack.getProperty(setting_key, "value"))
|
||||
return result
|
||||
|
||||
## Removes the container stack and user profile for the extruders for a specific machine.
|
||||
#
|
||||
# \param machine_id The machine to remove the extruders for.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue