Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alicevision/meshroom.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCandice Bentéjac <candice.bentejac@gmail.com>2022-09-01 15:13:49 +0300
committerCandice Bentéjac <candice.bentejac@gmail.com>2022-09-01 15:13:49 +0300
commit1f800aefd5a79dece6219ee7412076bc501b28cb (patch)
tree4970aaa8fa00291eb1f5942f4cc0a86c862b6085
parent92e77e77a9d7e6dfb6ca624d3a22b0f975e49e2b (diff)
Compare attribute's resolved link with default value
If an attribute is a link, when checking whether its value is the default value, only the resolved value should be compared with the default one. Otherwise, the attribute's "isDefault" property will always evaluate to True, even when a non-default link has been provided. This issue was especially evident with input File attributes, for which the default value is generally '' (empty string); if a link was set as a value (thus non-empty), its unresolved value would still be '', thus setting the "isDefault" property to True.
-rw-r--r--meshroom/core/attribute.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meshroom/core/attribute.py b/meshroom/core/attribute.py
index 65d6e3fe..eccffd64 100644
--- a/meshroom/core/attribute.py
+++ b/meshroom/core/attribute.py
@@ -283,7 +283,7 @@ class Attribute(BaseObject):
return copy.copy(self.desc.value)
def _isDefault(self):
- return self._value == self.defaultValue()
+ return self.value == self.defaultValue()
def getPrimitiveValue(self, exportDefault=True):
return self._value