mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 00:38:41 +02:00
[core] desc.Node: allow usage of DynamicNodeSize on output attributes
Also consider IntParam value as node size.
This commit is contained in:
parent
a0ba44fbff
commit
0b4d2c8927
1 changed files with 2 additions and 1 deletions
|
@ -318,13 +318,14 @@ class DynamicNodeSize(object):
|
|||
|
||||
def computeSize(self, node):
|
||||
param = node.attribute(self._param)
|
||||
assert param.isInput
|
||||
# Link: use linked node's size
|
||||
if param.isLink:
|
||||
return param.getLinkParam().node.size
|
||||
# ListAttribute: use list size
|
||||
if isinstance(param.desc, ListAttribute):
|
||||
return len(param)
|
||||
if isinstance(param.desc, IntParam):
|
||||
return param.value
|
||||
return 1
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue