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:
Ghostkeeper 2019-08-13 17:20:38 +02:00
parent 7d1f8e981b
commit 47fe4b4c90
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276

View File

@ -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