diff --git a/meshroom/ui/qml/Viewer/FeaturesInfoOverlay.qml b/meshroom/ui/qml/Viewer/FeaturesInfoOverlay.qml index ecfee836f5..f5d8572947 100644 --- a/meshroom/ui/qml/Viewer/FeaturesInfoOverlay.qml +++ b/meshroom/ui/qml/Viewer/FeaturesInfoOverlay.qml @@ -19,17 +19,31 @@ FloatingPane { property var mfeatures: null property var mtracks: null property var msfmdata: null + property var featuresNodeName: "" + property var tracksNodeName: "" + property var sfmdataNodeName: "" ColumnLayout { // Header RowLayout { + ColumnLayout { // Node used to read features - Label { - text: _reconstruction && _reconstruction.activeNodes.get("featureProvider").node ? _reconstruction.activeNodes.get("featureProvider").node.label : "" - Layout.fillWidth: true + Label { + text: "Features Provider: " + featuresNodeName + Layout.fillWidth: true + } + Label { + text: "Tracks Provider: " + tracksNodeName + Layout.fillWidth: true + } + Label { + text: "SfMData Provider: " + sfmdataNodeName + Layout.fillWidth: true + } } // Settings menu Loader { + Layout.alignment: Qt.AlignTop active: root.pluginStatus === Loader.Ready sourceComponent: MaterialToolButton { text: MaterialIcons.settings diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index 48a672e76c..72b2c160f9 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -1194,16 +1194,30 @@ FocusScope { if (!root.aliceVisionPluginAvailable) { return null } - return _reconstruction ? _reconstruction.activeNodes.get("matchProvider").node : null + + if (_reconstruction) + { + //Try first to use tracks + if (_reconstruction.activeNodes.get("trackProvider").node) + { + return _reconstruction.activeNodes.get("trackProvider").node + } + + return _reconstruction.activeNodes.get("matchProvider").node + } + + return null } + property bool isComputed: activeNode && activeNode.isComputed active: isUsed && isComputed onActiveChanged: { if (active) { - // instantiate and initialize a SfmStatsView component dynamically using Loader.setSource - // so it can fail safely if the c++ plugin is not available + // instantiate and initialize a mTracks component + // dynamically using Loader.setSource so it can fail safely + // if the c++ plugin is not available setSource("MTracks.qml", { "matchingFolders": Qt.binding(function() { let result = [] @@ -1219,6 +1233,18 @@ FocusScope { } return result }), + "tracksFile": Qt.binding(function() { + let result = "" + if (activeNode) { + if (activeNode.nodeType == "TracksBuilding" && isComputed) { + result = activeNode.attribute("output").value + } + else if (activeNode.hasAttribute("tracksFilename")) { + result = activeNode.attribute("tracksFilename").value + } + } + return result + }) }) } else { // Forcing the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14 @@ -1282,6 +1308,9 @@ FocusScope { mfeatures: mfeaturesLoader.item mtracks: mtracksLoader.item msfmdata: msfmDataLoader.item + featuresNodeName: (mfeaturesLoader.activeNode) ? mfeaturesLoader.activeNode.label : "None" + tracksNodeName: (mtracksLoader.activeNode) ? mtracksLoader.activeNode.label : "None" + sfmdataNodeName: (msfmDataLoader.activeNode) ? msfmDataLoader.activeNode.label : "None" } } diff --git a/meshroom/ui/reconstruction.py b/meshroom/ui/reconstruction.py index d398f2214d..d0f54f37b9 100755 --- a/meshroom/ui/reconstruction.py +++ b/meshroom/ui/reconstruction.py @@ -453,7 +453,9 @@ class Reconstruction(UIGraph): # Nodes that can be used to provide features folders to the UI "featureProvider": ["FeatureExtraction", "FeatureMatching", "StructureFromMotion"], # Nodes that can be used to provide matches folders to the UI - "matchProvider": ["FeatureMatching", "StructureFromMotion"] + "matchProvider": ["FeatureMatching", "StructureFromMotion"], + # Nodes that can be used to provide tracks files to the UI + "trackProvider": ["TracksBuilding", "SfMBootstraping", "SfMExpanding"] } # Nodes accessed from the UI uiNodes = [