diff options
author | Loïc Vital <mugulmotion@gmail.com> | 2022-09-27 10:46:36 +0300 |
---|---|---|
committer | Fabien Castan <fabcastan@gmail.com> | 2022-10-19 11:50:15 +0300 |
commit | 6b7d4d66a89315608585293aa1b08a6ea4eccb6d (patch) | |
tree | 625f07863c2cc515b45dc8b0868d7dc4a0731b98 | |
parent | 44c0086f40016908b9e743b63cc2e738107f6f77 (diff) |
[ui] prevent loading image output attributes in 3D viewer
-rw-r--r-- | meshroom/ui/qml/Viewer/Viewer2D.qml | 7 | ||||
-rwxr-xr-x | 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; } } |