mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-07 05:12:00 +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
|
property bool isUsed: displayFeatures.checked || displaySfmStatsView.checked || displaySfmDataGlobalStats.checked
|
||||||
|| displayPanoramaViewer.checked || displayLensDistortionViewer.checked
|
|| displayPanoramaViewer.checked || displayLensDistortionViewer.checked
|
||||||
property var activeNode: root.aliceVisionPluginAvailable ? _reconstruction.activeNodes.get('sfm').node : null
|
property var activeNode: {
|
||||||
property bool isComputed: {
|
if(! root.aliceVisionPluginAvailable){
|
||||||
if (usePanoramaViewer || useLensDistortionViewer)
|
return null
|
||||||
return activeNode
|
|
||||||
else
|
|
||||||
return activeNode && activeNode.isComputed
|
|
||||||
|
|
||||||
}
|
}
|
||||||
property string filepath: {
|
var sfmNode = _reconstruction.activeNodes.get('sfm').node
|
||||||
if (usePanoramaViewer || useLensDistortionViewer)
|
if(sfmNode === null){
|
||||||
return Filepath.stringToUrl(activeNode.attribute("input").value)
|
return null
|
||||||
else
|
|
||||||
return Filepath.stringToUrl(isComputed ? activeNode.attribute("output").value : "")
|
|
||||||
}
|
}
|
||||||
|
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
|
active: false
|
||||||
// It takes time to load tracks, so keep them looaded, if we may use it again.
|
// It takes time to load tracks, so keep them looaded, if we may use it again.
|
||||||
|
@ -615,9 +619,6 @@ FocusScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onIsComputedChanged: {
|
onIsComputedChanged: {
|
||||||
if (usePanoramaViewer || useLensDistortionViewer)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(!isComputed)
|
if(!isComputed)
|
||||||
{
|
{
|
||||||
active = false;
|
active = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue