mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:06:00 +08:00
Re-add getMetadata()
We need to deprecate it to not break functionality of old plug-ins and such. Contributes to issue CURA-6600.
This commit is contained in:
parent
7d1f8e981b
commit
47fe4b4c90
@ -23,6 +23,12 @@ class ContainerNode:
|
||||
self._container = None # type: Optional[InstanceContainer]
|
||||
self.children_map = {} # type: Dict[str, ContainerNode] # Mapping from container ID to container node.
|
||||
|
||||
## Gets the metadata of the container that this node represents.
|
||||
# \return The metadata of the container in this node.
|
||||
@deprecated("Get the metadata from the container with the ID of this node yourself.", "4.3")
|
||||
def getMetadata(self):
|
||||
return ContainerRegistry.getInstance().findContainersMetadata(id = self.container_id)[0]
|
||||
|
||||
## Get an entry from the metadata of the container that this node contains.
|
||||
# \param entry The metadata entry key to return.
|
||||
# \param default If the metadata is not present or the container is not
|
||||
|
Loading…
x
Reference in New Issue
Block a user