diff --git a/meshroom/ui/commands.py b/meshroom/ui/commands.py index 20882613..bbfb3063 100755 --- a/meshroom/ui/commands.py +++ b/meshroom/ui/commands.py @@ -245,7 +245,7 @@ class ImportProjectCommand(GraphCommand): else: self.graph.node(node.name).position = Position(node.x, node.y + lowestY + self.yOffset) - return status + return importedNodes def undoImpl(self): for nodeName in self.importedNames: diff --git a/meshroom/ui/graph.py b/meshroom/ui/graph.py index e9769bd4..7ace78d0 100644 --- a/meshroom/ui/graph.py +++ b/meshroom/ui/graph.py @@ -353,8 +353,8 @@ class UIGraph(QObject): self.setGraph(g) return status - @Slot(QUrl, result=bool) - @Slot(QUrl, QPoint, result=bool) + @Slot(QUrl, result="QVariantList") + @Slot(QUrl, QPoint, result="QVariantList") def importProject(self, filepath, position=None): if isinstance(filepath, (QUrl)): # depending how the QUrl has been initialized, diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index 0d801606..3262c622 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -234,7 +234,9 @@ Item { { if (MeshroomApp.pipelineTemplateNames.includes(pipeline)) { var url = MeshroomApp.pipelineTemplateFiles[MeshroomApp.pipelineTemplateNames.indexOf(pipeline)]["path"] - uigraph.importProject(Filepath.stringToUrl(url), spawnPosition) + var nodes = uigraph.importProject(Filepath.stringToUrl(url), spawnPosition) + uigraph.selectedNode = nodes[0] + uigraph.selectNodes(nodes) return true } return false