Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions meshroom/ui/qml/Viewer/FeaturesInfoOverlay.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 32 additions & 3 deletions meshroom/ui/qml/Viewer/Viewer2D.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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
Expand Down Expand Up @@ -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"
}
}

Expand Down
4 changes: 3 additions & 1 deletion meshroom/ui/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down