mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-01 19:27:10 +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)
|
return isinstance(value, pyCompatibility.basestring) and Attribute.stringIsLinkRe.match(value)
|
||||||
|
|
||||||
def getLinkParam(self):
|
def getLinkParam(self, recursive=False):
|
||||||
return self.node.graph.edge(self).src if self.isLink else None
|
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):
|
def _applyExpr(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue