mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-19 04:27:29 +08:00
Add warning for adding local copies of metadata
Contributes to issue CURA-6600.
This commit is contained in:
parent
e2596e64ef
commit
f31d7798ce
@ -21,6 +21,9 @@ class MachineNode(ContainerNode):
|
||||
self.variants = {} # type: Dict[str, VariantNode] # mapping variant names to their nodes.
|
||||
container_registry = ContainerRegistry.getInstance()
|
||||
my_metadata = container_registry.findContainersMetadata(id = container_id)[0]
|
||||
# Some of the metadata is cached upon construction here.
|
||||
# ONLY DO THAT FOR METADATA THAT DOESN'T CHANGE DURING RUNTIME!
|
||||
# Otherwise you need to keep it up-to-date during runtime.
|
||||
self.has_machine_materials = parseBool(my_metadata.get("has_machine_materials", "false"))
|
||||
self.has_machine_quality = parseBool(my_metadata.get("has_machine_quality", "false"))
|
||||
self.quality_definition = my_metadata.get("quality_definition", container_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user