mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-10 23:01:59 +02:00
[core] node: warning on lambda evaluation
This commit is contained in:
parent
93f8595bb3
commit
dc1ca91a31
1 changed files with 6 additions and 1 deletions
|
@ -670,7 +670,12 @@ class BaseNode(BaseObject):
|
||||||
if not isinstance(attr.attributeDesc, desc.File):
|
if not isinstance(attr.attributeDesc, desc.File):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
try:
|
||||||
defaultValue = attr.defaultValue()
|
defaultValue = attr.defaultValue()
|
||||||
|
except AttributeError as e:
|
||||||
|
# If we load an old scene, the lambda associated to the 'value' could try to access other params that could not exist yet
|
||||||
|
logging.warning('Invalid lambda evaluation for "{nodeName}.{attrName}"'.format(nodeName=self.name, attrName=attr.name))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
attr.value = defaultValue.format(**self._cmdVars)
|
attr.value = defaultValue.format(**self._cmdVars)
|
||||||
attr._invalidationValue = defaultValue.format(**cmdVarsNoCache)
|
attr._invalidationValue = defaultValue.format(**cmdVarsNoCache)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue