[core] attr: uid for dynamic output attributes use the node uid

This commit is contained in:
Fabien Castan 2024-06-16 18:40:59 +02:00
parent c2a699e484
commit 695d590ea6

View file

@ -273,8 +273,12 @@ class Attribute(BaseObject):
# 'uidIndex' should be in 'self.desc.uid' but in the case of linked attribute # 'uidIndex' should be in 'self.desc.uid' but in the case of linked attribute
# it will not be the case (so we cannot have an assert). # it will not be the case (so we cannot have an assert).
if self.isOutput: if self.isOutput:
# only dependent on the hash of its value without the cache folder if self.desc.isDynamicValue:
return hashValue(self._invalidationValue) # if it is dynamic, the uid is the one from the node itself
return self.node._uids.get(uidIndex)
else:
# only dependent on the hash of its value without the cache folder
return hashValue(self._invalidationValue)
if self.isLink: if self.isLink:
linkParam = self.getLinkParam(recursive=True) linkParam = self.getLinkParam(recursive=True)
return linkParam.uid(uidIndex) return linkParam.uid(uidIndex)