From 6b7d4d66a89315608585293aa1b08a6ea4eccb6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= Date: Tue, 27 Sep 2022 09:46:36 +0200 Subject: [ui] prevent loading image output attributes in 3D viewer --- meshroom/ui/qml/Viewer/Viewer2D.qml | 7 ++++--- meshroom/ui/qml/main.qml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index f2b6bc8e..e47c6bf9 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -157,12 +157,12 @@ FocusScope { function tryLoadNode(node) { // safety check if (!node) { - return; + return false; } // node must be computed or at least running if (!node.isFinishedOrRunning()) { - return; + return false; } // node must have at least one output attribute with the image semantic @@ -175,10 +175,11 @@ FocusScope { } } if (!hasImageOutputAttr) { - return; + return false; } displayedNode = node; + return true; } function getImageFile() { diff --git a/meshroom/ui/qml/main.qml b/meshroom/ui/qml/main.qml index 2967671c..9820dee5 100755 --- a/meshroom/ui/qml/main.qml +++ b/meshroom/ui/qml/main.qml @@ -858,7 +858,7 @@ ApplicationWindow { // 3D viewer for (var i = 0; i < node.attributes.count; i++) { var attr = node.attributes.at(i) - if(attr.isOutput && workspaceView.viewIn3D(attr, mouse)) + if(attr.isOutput && attr.desc.semantic != "image" && workspaceView.viewIn3D(attr, mouse)) break; } } -- cgit v1.2.3