Skip to content

Commit 99ea263

Browse files
committed
[ui][qml] Viewer2D: PhongImageViewer Fix qml loader error logs
1 parent 6608abb commit 99ea263

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

meshroom/ui/qml/Viewer/Viewer2D.qml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -731,14 +731,14 @@ FocusScope {
731731
'gamma': Qt.binding(function() { return hdrImageToolbar.gammaValue }),
732732
'gain': Qt.binding(function() { return hdrImageToolbar.gainValue }),
733733
'channelModeString': Qt.binding(function() { return hdrImageToolbar.channelModeValue }),
734-
'baseColor': Qt.binding(function() { return phongImageViewerToolbarLoader.status === Loader.Ready ? phongImageViewerToolbarLoader.item.baseColorValue : "#ffffff" }),
735-
'textureOpacity': Qt.binding(function() { return phongImageViewerToolbarLoader.status === Loader.Ready ? phongImageViewerToolbarLoader.item.textureOpacityValue : 0.0}),
736-
'ka': Qt.binding(function() { return phongImageViewerToolbarLoader.status === Loader.Ready ? phongImageViewerToolbarLoader.item.kaValue : 0.0 }),
737-
'kd': Qt.binding(function() { return phongImageViewerToolbarLoader.status === Loader.Ready ? phongImageViewerToolbarLoader.item.kdValue : 0.0 }),
738-
'ks': Qt.binding(function() { return phongImageViewerToolbarLoader.status === Loader.Ready ? phongImageViewerToolbarLoader.item.ksValue : 0.0 }),
739-
'shininess': Qt.binding(function() { return phongImageViewerToolbarLoader.status === Loader.Ready ? phongImageViewerToolbarLoader.item.shininessValue : 0.0 }),
740-
'lightYaw': Qt.binding(function() { return directionalLightPaneLoader.status === Loader.Ready ? -directionalLightPaneLoader.item.lightYawValue : 0.0 }), // left handed coordinate system
741-
'lightPitch': Qt.binding(function() { return directionalLightPaneLoader.status === Loader.Ready ? directionalLightPaneLoader.item.lightPitchValue : 0.0 }),
734+
'baseColor': Qt.binding(function() { return phongImageViewerToolbarLoader.item !== null ? phongImageViewerToolbarLoader.item.baseColorValue : "#ffffff" }),
735+
'textureOpacity': Qt.binding(function() { return phongImageViewerToolbarLoader.item !== null ? phongImageViewerToolbarLoader.item.textureOpacityValue : 0.0}),
736+
'ka': Qt.binding(function() { return phongImageViewerToolbarLoader.item !== null ? phongImageViewerToolbarLoader.item.kaValue : 0.0 }),
737+
'kd': Qt.binding(function() { return phongImageViewerToolbarLoader.item !== null ? phongImageViewerToolbarLoader.item.kdValue : 0.0 }),
738+
'ks': Qt.binding(function() { return phongImageViewerToolbarLoader.item !== null ? phongImageViewerToolbarLoader.item.ksValue : 0.0 }),
739+
'shininess': Qt.binding(function() { return phongImageViewerToolbarLoader.item !== null ? phongImageViewerToolbarLoader.item.shininessValue : 0.0 }),
740+
'lightYaw': Qt.binding(function() { return directionalLightPaneLoader.item !== null ? -directionalLightPaneLoader.item.lightYawValue : 0.0 }), // left handed coordinate system
741+
'lightPitch': Qt.binding(function() { return directionalLightPaneLoader.item !== null ? directionalLightPaneLoader.item.lightPitchValue : 0.0 }),
742742
})
743743
} else {
744744
// Forcing the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14
@@ -1420,7 +1420,7 @@ FocusScope {
14201420
margins: 2
14211421
}
14221422
sourceComponent: DirectionalLightPane {
1423-
visible: phongImageViewerToolbarLoader.item.displayLightController
1423+
visible: phongImageViewerToolbarLoader.item !== null && phongImageViewerToolbarLoader.item.displayLightController
14241424
}
14251425
}
14261426
}

0 commit comments

Comments
 (0)