mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-02 00:08:29 +02:00
[core] correct the actions order when loading the project file
We now call applyExpr before updateInternals is called (triggered by setupProjectFile and/or end of GraphModification). So the input parameters expressions/connections are up-to-date (after applyExpr) when updateInternals will evaluate the input/output parameters.
This commit is contained in:
parent
202c1db5ff
commit
082f9b5843
2 changed files with 16 additions and 10 deletions
|
@ -584,8 +584,13 @@ class BaseNode(BaseObject):
|
|||
continue
|
||||
|
||||
defaultValue = attr.defaultValue()
|
||||
attr.value = defaultValue.format(**self._cmdVars)
|
||||
attr._invalidationValue = defaultValue.format(**cmdVarsNoCache)
|
||||
try:
|
||||
attr.value = defaultValue.format(**self._cmdVars)
|
||||
attr._invalidationValue = defaultValue.format(**cmdVarsNoCache)
|
||||
except KeyError as e:
|
||||
logging.warning('Invalid expression with missing key on "{nodeName}.{attrName}" with value "{defaultValue}".\nError: {err}'.format(nodeName=self.name, attrName=attr.name, defaultValue=defaultValue, err=str(e)))
|
||||
except ValueError as e:
|
||||
logging.warning('Invalid expression value on "{nodeName}.{attrName}" with value "{defaultValue}".\nError: {err}'.format(nodeName=self.name, attrName=attr.name, defaultValue=defaultValue, err=str(e)))
|
||||
v = attr.getValueStr()
|
||||
|
||||
self._cmdVars[name] = '--{name} {value}'.format(name=name, value=v)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue