mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 07:09:01 +08:00
Create intent nodes based on the selected quality type
Previously it would use the material type from the material, but since the material from the node can be different to that of the quality, we need to use the one from quality instead (This is due to the fallback system) CURA-6807
This commit is contained in:
parent
56c7fb9f7d
commit
f469b99471
@ -23,15 +23,17 @@ class QualityNode(ContainerNode):
|
||||
|
||||
my_metadata = ContainerRegistry.getInstance().findContainersMetadata(id = container_id)[0]
|
||||
self.quality_type = my_metadata["quality_type"]
|
||||
|
||||
# The material type of the parent doesn't need to be the same as this due to generic fallbacks.
|
||||
self._material = my_metadata.get("material")
|
||||
self._loadAll()
|
||||
|
||||
def _loadAll(self) -> None:
|
||||
container_registry = ContainerRegistry.getInstance()
|
||||
|
||||
# Find all intent profiles that fit the current configuration.
|
||||
from cura.Machines.MachineNode import MachineNode
|
||||
if not isinstance(self.parent, MachineNode): # Not a global profile.
|
||||
for intent in container_registry.findInstanceContainersMetadata(type = "intent", definition = self.parent.variant.machine.quality_definition, variant = self.parent.variant.variant_name, material = self.parent.base_file, quality_type = self.quality_type):
|
||||
for intent in container_registry.findInstanceContainersMetadata(type = "intent", definition = self.parent.variant.machine.quality_definition, variant = self.parent.variant.variant_name, material = self._material, quality_type = self.quality_type):
|
||||
self.intents[intent["id"]] = IntentNode(intent["id"], quality = self)
|
||||
|
||||
self.intents["empty_intent"] = IntentNode("empty_intent", quality = self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user