From 9aa9e7fe6e7c74b5b7665abe93b8232bc341b9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Tue, 17 Dec 2024 11:03:33 +0000 Subject: [PATCH 1/3] [GraphEditor] Add missing import of `Utils` to access `Format` methods --- meshroom/ui/qml/GraphEditor/NodeStatistics.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/ui/qml/GraphEditor/NodeStatistics.qml b/meshroom/ui/qml/GraphEditor/NodeStatistics.qml index 12cfe863e3..9849bc952a 100644 --- a/meshroom/ui/qml/GraphEditor/NodeStatistics.qml +++ b/meshroom/ui/qml/GraphEditor/NodeStatistics.qml @@ -3,6 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import Controls 1.0 +import Utils 1.0 /** * NodeStatistics displays statistics data of Node's chunks (NodeChunks). From e3f1e27c68bb6d977f110885be21be67e9dbe672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Tue, 17 Dec 2024 19:05:03 +0100 Subject: [PATCH 2/3] [Viewer3D] MediaLoader: Bind `fixedPointSize` for the SfMLoader The `fixedPointSize` parameter was used to determine whether the point size was fixed or programmable from the QML (using a `PointSize` render state). With Qt6, this render state is not correctly handled by the RHI and we need to set directly within the shader whether the point size is fixed or not, hence the binding. --- meshroom/ui/qml/Viewer3D/MediaLoader.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/ui/qml/Viewer3D/MediaLoader.qml b/meshroom/ui/qml/Viewer3D/MediaLoader.qml index fba782e596..98f95bad31 100644 --- a/meshroom/ui/qml/Viewer3D/MediaLoader.qml +++ b/meshroom/ui/qml/Viewer3D/MediaLoader.qml @@ -108,6 +108,7 @@ import Utils 1.0 Component.onCompleted: { var obj = Viewer3DSettings.sfmDataLoaderComp.createObject(sfmDataLoaderEntity, { "source": source, + "fixedPointSize": Qt.binding(function() { return Viewer3DSettings.fixedPointSize }), "pointSize": Qt.binding(function() { return 0.01 * Viewer3DSettings.pointSize }), "locatorScale": Qt.binding(function() { return Viewer3DSettings.cameraScale }), "cameraPickingEnabled": Qt.binding(function() { return root.enabled && root.cameraPickingEnabled }), From ebbd000714942adcc0709381eaef0e330ce4919c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Tue, 17 Dec 2024 19:07:40 +0100 Subject: [PATCH 3/3] [Viewer3D] MediaLoader: Send `pointSize` as is `pointSize` was divided by 100 before being sent to the shader that rendered the programmable points, and was used as is to set the size of the "fixed size" points implicitly in the QML. Now that both cases are handled by the same shader, we do not need to perform this division here: it will be done directly in the shader (by opposition, keeping it here would have meant performing a x100 multiplication in the shader for the "fixed size" case). --- meshroom/ui/qml/Viewer3D/MediaLoader.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/ui/qml/Viewer3D/MediaLoader.qml b/meshroom/ui/qml/Viewer3D/MediaLoader.qml index 98f95bad31..986eaf2031 100644 --- a/meshroom/ui/qml/Viewer3D/MediaLoader.qml +++ b/meshroom/ui/qml/Viewer3D/MediaLoader.qml @@ -109,7 +109,7 @@ import Utils 1.0 var obj = Viewer3DSettings.sfmDataLoaderComp.createObject(sfmDataLoaderEntity, { "source": source, "fixedPointSize": Qt.binding(function() { return Viewer3DSettings.fixedPointSize }), - "pointSize": Qt.binding(function() { return 0.01 * Viewer3DSettings.pointSize }), + "pointSize": Qt.binding(function() { return Viewer3DSettings.pointSize }), "locatorScale": Qt.binding(function() { return Viewer3DSettings.cameraScale }), "cameraPickingEnabled": Qt.binding(function() { return root.enabled && root.cameraPickingEnabled }), "resectionId": Qt.binding(function() { return Viewer3DSettings.resectionId }),