mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Merge pull request #2685 from Ultimaker/container_stack_improvements
Container stack improvements
This commit is contained in:
parent
da14ce5bef
commit
657a91c525
43 changed files with 556 additions and 836 deletions
|
@ -23,9 +23,9 @@ class GlobalStack(CuraContainerStack):
|
|||
def __init__(self, container_id: str, *args, **kwargs):
|
||||
super().__init__(container_id, *args, **kwargs)
|
||||
|
||||
self.addMetaDataEntry("type", "machine") # For backward compatibility
|
||||
self.addMetaDataEntry("type", "machine") # For backward compatibility
|
||||
|
||||
self._extruders = {}
|
||||
self._extruders = {} # type: Dict[str, "ExtruderStack"]
|
||||
|
||||
# This property is used to track which settings we are calculating the "resolve" for
|
||||
# and if so, to bypass the resolve to prevent an infinite recursion that would occur
|
||||
|
@ -61,13 +61,6 @@ class GlobalStack(CuraContainerStack):
|
|||
# \throws Exceptions.TooManyExtrudersError Raised when trying to add an extruder while we
|
||||
# already have the maximum number of extruders.
|
||||
def addExtruder(self, extruder: ContainerStack) -> None:
|
||||
extruder_count = self.getProperty("machine_extruder_count", "value")
|
||||
|
||||
if extruder_count <= 1:
|
||||
Logger.log("i", "Not adding extruder[%s] to [%s] because it is a single-extrusion machine.",
|
||||
extruder.id, self.id)
|
||||
return
|
||||
|
||||
position = extruder.getMetaDataEntry("position")
|
||||
if position is None:
|
||||
Logger.log("w", "No position defined for extruder {extruder}, cannot add it to stack {stack}", extruder = extruder.id, stack = self.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue