diff --git a/meshroom/core/attribute.py b/meshroom/core/attribute.py index e0d71cd339..043804fba4 100644 --- a/meshroom/core/attribute.py +++ b/meshroom/core/attribute.py @@ -92,7 +92,8 @@ def getFullNameToNode(self): def getFullNameToGraph(self): """ 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): """ Return link expression for this Attribute """ @@ -124,7 +125,8 @@ def getFullLabelToNode(self): def getFullLabelToGraph(self): """ 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): if isinstance(self.desc.enabled, types.FunctionType): diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index 3829648d32..27b98d2f58 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -1003,9 +1003,9 @@ FocusScope { { return true; } - var inputAttr = activeNode.attribute("input"); - if(!inputAttr) + if(!activeNode.hasAttribute("input")) return false; + var inputAttr = activeNode.attribute("input"); var inputAttrLink = inputAttr.rootLinkParam; if(!inputAttrLink) return false;