diff --git a/meshroom/ui/qml/GraphEditor/Node.qml b/meshroom/ui/qml/GraphEditor/Node.qml index 955a6d8e8e..b338055e9e 100755 --- a/meshroom/ui/qml/GraphEditor/Node.qml +++ b/meshroom/ui/qml/GraphEditor/Node.qml @@ -308,7 +308,8 @@ Item { MaterialLabel { id: nodeImageOutput - visible: node.hasImageOutput && ["SUCCESS"].includes(node.globalStatus) && node.chunks.count > 0 + visible: (node.hasImageOutput || node.has3DOutput) + && ["SUCCESS"].includes(node.globalStatus) && node.chunks.count > 0 text: MaterialIcons.visibility padding: 2 font.pointSize: 7 @@ -317,8 +318,14 @@ Item { id: nodeImageOutputTooltip parent: header visible: nodeImageOutputMA.containsMouse && nodeImageOutput.visible - text: "This node has at least one output that can be loaded in the 2D Viewer.\n" + - "Double-clicking on this node will load it in the 2D Viewer." + text: { + if (node.hasImageOutput && !node.has3DOutput) + return "Double-click on this node to load its outputs in the Image Viewer." + else if (node.has3DOutput && !node.hasImageOutput) + return "Double-click on this node to load its outputs in the 3D Viewer." + else // Handle case where a node might have both 2D and 3D outputs + return "Double-click on this node to load its outputs in the Image or 3D Viewer." + } implicitWidth: 500 delay: 300 diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index 9b12d83afc..44206cacc0 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -181,15 +181,7 @@ FocusScope { } // node must have at least one output attribute with the image semantic - var hasImageOutputAttr = false; - for (var i = 0; i < node.attributes.count; i++) { - var attr = node.attributes.at(i); - if (attr.isOutput && attr.desc.semantic === "image" && attr.enabled) { - hasImageOutputAttr = true; - break; - } - } - if (!hasImageOutputAttr) { + if (!node.hasImageOutput) { return false; }