mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-03 11:21:52 +02:00
[core] Add support for lambda function in Attribute desc value
Allows to dynamically configure the default value of the Attribute in python.
This commit is contained in:
parent
05a93c28a2
commit
bbc56cfb31
2 changed files with 7 additions and 3 deletions
|
@ -583,8 +583,9 @@ class BaseNode(BaseObject):
|
|||
if not isinstance(attr.attributeDesc, desc.File):
|
||||
continue
|
||||
|
||||
attr.value = attr.attributeDesc.value.format(**self._cmdVars)
|
||||
attr._invalidationValue = attr.attributeDesc.value.format(**cmdVarsNoCache)
|
||||
defaultValue = attr.defaultValue()
|
||||
attr.value = defaultValue.format(**self._cmdVars)
|
||||
attr._invalidationValue = defaultValue.format(**cmdVarsNoCache)
|
||||
v = attr.getValueStr()
|
||||
|
||||
self._cmdVars[name] = '--{name} {value}'.format(name=name, value=v)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue