mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-30 06:11:09 -07:00
Have variant nodes build their own children
When a variant and a variant love each other... Contributes to issue CURA-6600.
This commit is contained in:
parent
65b1a43e88
commit
b46d4eb2b5
2 changed files with 65 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from UM.Util import parseBool
|
||||
from UM.Settings.ContainerRegistry import ContainerRegistry # To find all the variants for this machine.
|
||||
from UM.Settings.Interfaces import ContainerInterface
|
||||
from cura.Machines.ContainerNode import ContainerNode
|
||||
|
|
@ -19,6 +20,7 @@ class MachineNode(ContainerNode):
|
|||
super().__init__(container_id, None)
|
||||
self.variants = {} # type: Dict[str, VariantNode] # mapping variant names to their nodes.
|
||||
container_registry = ContainerRegistry.getInstance()
|
||||
self.has_machine_materials = parseBool(container_registry.findContainersMetadata(id = container_id)[0].get("has_machine_materials", "true"))
|
||||
container_registry.allMetadataLoaded.connect(self._reloadAll)
|
||||
container_registry.containerAdded.connect(self._variantAdded)
|
||||
self._reloadAll()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue