mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 10:17:27 +02:00
[core] expose a recursive option in getLinkParam
This commit is contained in:
parent
baac501559
commit
2401a366e2
1 changed files with 9 additions and 2 deletions
|
@ -164,8 +164,15 @@ class Attribute(BaseObject):
|
|||
"""
|
||||
return isinstance(value, pyCompatibility.basestring) and Attribute.stringIsLinkRe.match(value)
|
||||
|
||||
def getLinkParam(self):
|
||||
return self.node.graph.edge(self).src if self.isLink else None
|
||||
def getLinkParam(self, recursive=False):
|
||||
if not self.isLink:
|
||||
return None
|
||||
linkParam = self.node.graph.edge(self).src
|
||||
if not recursive:
|
||||
return linkParam
|
||||
if linkParam.isLink:
|
||||
return linkParam.getLinkParam(recursive)
|
||||
return linkParam
|
||||
|
||||
def _applyExpr(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue