[ui] GraphEditor: select pipelines imported through the node menu

Add all the nodes from a pipeline imported through the node menu to the
node selection.
This involves changing the return value of ImportProjectCommand from a
boolean to a list of imported nodes.
This commit is contained in:
Candice Bentéjac 2022-12-02 18:19:56 +01:00
parent 9d88ad91d5
commit 6a36da61cf
3 changed files with 6 additions and 4 deletions

View file

@ -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