Import a scene from an .mg file into the current graph

Add an "Import Scene" (Ctrl+Shift+I) option in the File menu
that allows to select an existing .mg file and import it in the
current graph.

The imported scene will automatically be placed below the lowest
existing node along the Y axis.
This commit is contained in:
Candice Bentéjac 2022-08-31 10:50:35 +02:00
parent ede24713d0
commit a33f79e4d7
4 changed files with 159 additions and 3 deletions

View file

@ -304,6 +304,16 @@ ApplicationWindow {
}
}
FileDialog {
id: importSceneDialog
title: "Import Scene"
selectMultiple: false
nameFilters: ["Meshroom Graphs (*.mg)"]
onAccepted: {
graphEditor.uigraph.importScene(importSceneDialog.fileUrl)
}
}
AboutDialog {
id: aboutDialog
}
@ -530,6 +540,12 @@ ApplicationWindow {
}
}
}
Action {
id: importSceneAction
text: "Import Scene"
shortcut: "Ctrl+Shift+I"
onTriggered: importSceneDialog.open()
}
Action {
id: importActionItem
text: "Import Images"