[Panorama Viewer] apply node values on Initialization

This commit is contained in:
Thomas Zorroche 2021-07-15 14:11:24 +02:00 committed by Fabien Castan
parent 86a0953027
commit 7c8431bc4c
2 changed files with 4 additions and 8 deletions

View file

@ -40,11 +40,12 @@ AliceVision.FloatImageViewer {
onStatusChanged: { onStatusChanged: {
if (viewerTypeString === "panorama") { if (viewerTypeString === "panorama") {
// Force to update the surface grid after a downscale change // Force to update the surface grid after a downscale change
surface.rotateSurfaceRadians(0, 0) surface.rotateSurfaceRadians(
_reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.y").value * (3.14 / 180),
_reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.x").value * (3.14 / 180))
} }
root.surface.setIdView(idView); root.surface.setIdView(idView);
updateSfmPath();
} }
property string channelModeString : "rgba" property string channelModeString : "rgba"
@ -77,11 +78,6 @@ AliceVision.FloatImageViewer {
property int index: 0; property int index: 0;
property var idView: 0; property var idView: 0;
function updateSfmPath() {
var activeNode = _reconstruction.activeNodes.get('SfMTransform').node;
root.surface.sfmPath = activeNode ? activeNode.attribute("input").value : "";
}
function updatePrincipalPoint() { function updatePrincipalPoint() {
var pp = root.surface.getPrincipalPoint(); var pp = root.surface.getPrincipalPoint();
ppRect.x = pp.x; ppRect.x = pp.x;

View file

@ -876,7 +876,7 @@ FocusScope {
return inputAttrLink.node.isComputed; return inputAttrLink.node.isComputed;
} }
ToolTip.text: "Panorama Viewer: " + activeNode.label ToolTip.text: activeNode ? "Panorama Viewer " + activeNode.label : "Panorama Viewer"
text: MaterialIcons.panorama_sphere text: MaterialIcons.panorama_sphere
font.pointSize: 16 font.pointSize: 16
padding: 0 padding: 0