mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-05 04:12:15 +02:00
[core] Check a graph exists before accessing its name
If the graph does not exist, return "UNDEFINED" as its name.
This commit is contained in:
parent
6579ed3797
commit
909f38ccb8
1 changed files with 4 additions and 2 deletions
|
@ -92,7 +92,8 @@ class Attribute(BaseObject):
|
||||||
|
|
||||||
def getFullNameToGraph(self):
|
def getFullNameToGraph(self):
|
||||||
""" Name inside the Graph: graphName.nodeName.groupName.name """
|
""" Name inside the Graph: graphName.nodeName.groupName.name """
|
||||||
return '{}.{}'.format(self.node.graph.name, self.getFullNameToNode())
|
graphName = self.node.graph.name if self.node.graph else "UNDEFINED"
|
||||||
|
return '{}.{}'.format(graphName, self.getFullNameToNode())
|
||||||
|
|
||||||
def asLinkExpr(self):
|
def asLinkExpr(self):
|
||||||
""" Return link expression for this Attribute """
|
""" Return link expression for this Attribute """
|
||||||
|
@ -124,7 +125,8 @@ class Attribute(BaseObject):
|
||||||
|
|
||||||
def getFullLabelToGraph(self):
|
def getFullLabelToGraph(self):
|
||||||
""" Label inside the Graph: graphName nodeLabel groupLabel Label """
|
""" Label inside the Graph: graphName nodeLabel groupLabel Label """
|
||||||
return '{} {}'.format(self.node.graph.name, self.getFullLabelToNode())
|
graphName = self.node.graph.name if self.node.graph else "UNDEFINED"
|
||||||
|
return '{} {}'.format(graphName, self.getFullLabelToNode())
|
||||||
|
|
||||||
def getEnabled(self):
|
def getEnabled(self):
|
||||||
if isinstance(self.desc.enabled, types.FunctionType):
|
if isinstance(self.desc.enabled, types.FunctionType):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue