diff --git a/meshroom/ui/qml/ImageGallery/ImageGallery.qml b/meshroom/ui/qml/ImageGallery/ImageGallery.qml index c89afcce..7f34a66d 100644 --- a/meshroom/ui/qml/ImageGallery/ImageGallery.qml +++ b/meshroom/ui/qml/ImageGallery/ImageGallery.qml @@ -23,6 +23,7 @@ Panel { readonly property string currentItemSource: grid.currentItem ? grid.currentItem.source : "" readonly property var currentItemMetadata: grid.currentItem ? grid.currentItem.metadata : undefined readonly property int centerViewId: (_reconstruction && _reconstruction.sfmTransform) ? parseInt(_reconstruction.sfmTransform.attribute("transformation").value) : 0 + readonly property alias galleryGrid: grid property int defaultCellSize: 160 property bool readOnly: false diff --git a/meshroom/ui/qml/WorkspaceView.qml b/meshroom/ui/qml/WorkspaceView.qml index 284c7c6d..dab41815 100644 --- a/meshroom/ui/qml/WorkspaceView.qml +++ b/meshroom/ui/qml/WorkspaceView.qml @@ -24,6 +24,7 @@ Item { property bool readOnly: false property alias panel3dViewer: panel3dViewerLoader.item readonly property Viewer2D viewer2D: viewer2D + readonly property alias imageGallery: imageGallery implicitWidth: 300 implicitHeight: 400 diff --git a/meshroom/ui/qml/main.qml b/meshroom/ui/qml/main.qml index 231fc94e..d3b31d36 100644 --- a/meshroom/ui/qml/main.qml +++ b/meshroom/ui/qml/main.qml @@ -482,6 +482,9 @@ ApplicationWindow { let folder = ""; if (_reconstruction.graph && _reconstruction.graph.filepath) { folder = Filepath.stringToUrl(Filepath.dirname(_reconstruction.graph.filepath)); + if (imagesFolder.toString() === "" && workspaceView.imageGallery.galleryGrid.itemAtIndex(0) !== null) { + imagesFolder = Filepath.dirname(workspaceView.imageGallery.galleryGrid.itemAtIndex(0).source); + } } else { var projects = MeshroomApp.recentProjectFiles; if (projects.length > 0 && Filepath.exists(projects[0])) {