diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index 661dfc11..77777b2a 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -590,20 +590,24 @@ FocusScope { property bool isUsed: displayFeatures.checked || displaySfmStatsView.checked || displaySfmDataGlobalStats.checked || displayPanoramaViewer.checked || displayLensDistortionViewer.checked - property var activeNode: root.aliceVisionPluginAvailable ? _reconstruction.activeNodes.get('sfm').node : null - property bool isComputed: { - if (usePanoramaViewer || useLensDistortionViewer) - return activeNode - else - return activeNode && activeNode.isComputed - - } - property string filepath: { - if (usePanoramaViewer || useLensDistortionViewer) - return Filepath.stringToUrl(activeNode.attribute("input").value) - else - return Filepath.stringToUrl(isComputed ? activeNode.attribute("output").value : "") + property var activeNode: { + if(! root.aliceVisionPluginAvailable){ + return null + } + var sfmNode = _reconstruction.activeNodes.get('sfm').node + if(sfmNode === null){ + return null + } + if(displayPanoramaViewer.checked){ + var previousNode = sfmNode.attribute("input").rootLinkParam.node + return previousNode + } + else{ + return sfmNode + } } + property bool isComputed: activeNode && activeNode.isComputed + property string filepath: Filepath.stringToUrl(isComputed ? activeNode.attribute("output").value : "") active: false // It takes time to load tracks, so keep them looaded, if we may use it again. @@ -615,9 +619,6 @@ FocusScope { } } onIsComputedChanged: { - if (usePanoramaViewer || useLensDistortionViewer) - return; - if(!isComputed) { active = false;