From 47fe4b4c90da94deae6d69d8fe86502708e086bd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 13 Aug 2019 17:20:38 +0200 Subject: [PATCH] Re-add getMetadata() We need to deprecate it to not break functionality of old plug-ins and such. Contributes to issue CURA-6600. --- cura/Machines/ContainerNode.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cura/Machines/ContainerNode.py b/cura/Machines/ContainerNode.py index 8fd381a7fb..32ebe203a3 100644 --- a/cura/Machines/ContainerNode.py +++ b/cura/Machines/ContainerNode.py @@ -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