mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-25 20:47:39 +02:00
[graph] Attribute: robust UIDs for list of elements as value
Fix variable UIDs for non-exclusive choices, which could be affected by different string encodings
This commit is contained in:
parent
7e2d37c819
commit
f1fdd34b6c
1 changed files with 3 additions and 2 deletions
|
@ -166,8 +166,9 @@ class Attribute(BaseObject):
|
||||||
return hash(self._invalidationValue)
|
return hash(self._invalidationValue)
|
||||||
if self.isLink:
|
if self.isLink:
|
||||||
return self.getLinkParam().uid()
|
return self.getLinkParam().uid()
|
||||||
if isinstance(self._value, basestring):
|
if isinstance(self._value, (list, tuple, set,)):
|
||||||
return hash(str(self._value))
|
# hash of sorted values hashed
|
||||||
|
return hash([hash(v) for v in sorted(self._value)])
|
||||||
return hash(self._value)
|
return hash(self._value)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue