mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-02 19:02:29 +02:00
[Panorama Viewer] Simplify use of mSfMData object for pano viewer
This commit is contained in:
parent
188d91453b
commit
f37166dae6
1 changed files with 17 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue