mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-18 00:57:16 +02:00
[core] Attribute: change isLink check for _applyExpr()
This commit is contained in:
parent
95471e3e1b
commit
ee7c0d0fd5
1 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,7 @@ else:
|
|||
bytes = str
|
||||
basestring = basestring
|
||||
|
||||
stringIsLinkRe = re.compile('^\{.+\}$')
|
||||
stringIsLinkRe = re.compile('^\{[A-Za-z]+[A-Za-z0-9_.]*\}$')
|
||||
|
||||
def isCollection(v):
|
||||
return isinstance(v, collections.Iterable) and not isinstance(v, basestring)
|
||||
|
@ -63,7 +63,7 @@ def GraphModification(graph):
|
|||
"""
|
||||
if not isinstance(graph, Graph):
|
||||
raise ValueError("GraphModification expects a Graph instance")
|
||||
# Store update policy
|
||||
# Store update policy for nested usage
|
||||
enabled = graph.updateEnabled
|
||||
# Disable graph update for nested block
|
||||
# (does nothing if already disabled)
|
||||
|
@ -210,7 +210,7 @@ class Attribute(BaseObject):
|
|||
g = self.node.graph
|
||||
g.addEdge(v, self)
|
||||
self._value = ""
|
||||
elif isinstance(v, basestring) and len(v) > 2 and v[0] == '{' and v[-1] == '}':
|
||||
elif self.isInput and isinstance(v, basestring) and stringIsLinkRe.match(v):
|
||||
# value is a link to another attribute
|
||||
g = self.node.graph
|
||||
link = v[1:-1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue