mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 17:57:16 +02:00
[core] Attribute: Strip ending "/" from invalidation values
By doing so, invalidation values will evaluate to the same UID independently from whether the attribute's value has been written with an extra "/" or not.
This commit is contained in:
parent
8afc9adad3
commit
e0b2aafae3
1 changed files with 5 additions and 2 deletions
|
@ -276,8 +276,11 @@ class Attribute(BaseObject):
|
|||
# To guarantee that each output attribute receives a unique ID, we add the attribute name to it.
|
||||
return hashValue((self.name, self.node._uid))
|
||||
else:
|
||||
# only dependent on the hash of its value without the cache folder
|
||||
return hashValue(self._invalidationValue)
|
||||
# Only dependent on the hash of its value without the cache folder.
|
||||
# "/" at the end of the link is stripped to prevent having different UIDs depending on
|
||||
# whether the invalidation value finishes with it or not
|
||||
strippedInvalidationValue = self._invalidationValue.rstrip("/")
|
||||
return hashValue(strippedInvalidationValue)
|
||||
if self.isLink:
|
||||
linkParam = self.getLinkParam(recursive=True)
|
||||
return linkParam.uid()
|
||||
|
|
Loading…
Add table
Reference in a new issue