@@ -1194,16 +1194,30 @@ FocusScope {
11941194 if (! root .aliceVisionPluginAvailable ) {
11951195 return null
11961196 }
1197- return _reconstruction ? _reconstruction .activeNodes .get (" matchProvider" ).node : null
1197+
1198+ if (_reconstruction)
1199+ {
1200+ // Try first to use tracks
1201+ if (_reconstruction .activeNodes .get (" trackProvider" ).node )
1202+ {
1203+ return _reconstruction .activeNodes .get (" trackProvider" ).node
1204+ }
1205+
1206+ return _reconstruction .activeNodes .get (" matchProvider" ).node
1207+ }
1208+
1209+ return null
11981210 }
1211+
11991212 property bool isComputed: activeNode && activeNode .isComputed
12001213
12011214 active: isUsed && isComputed
12021215
12031216 onActiveChanged: {
12041217 if (active) {
1205- // instantiate and initialize a SfmStatsView component dynamically using Loader.setSource
1206- // so it can fail safely if the c++ plugin is not available
1218+ // instantiate and initialize a mTracks component
1219+ // dynamically using Loader.setSource so it can fail safely
1220+ // if the c++ plugin is not available
12071221 setSource (" MTracks.qml" , {
12081222 " matchingFolders" : Qt .binding (function () {
12091223 let result = []
@@ -1219,6 +1233,18 @@ FocusScope {
12191233 }
12201234 return result
12211235 }),
1236+ " tracksFile" : Qt .binding (function () {
1237+ let result = " "
1238+ if (activeNode) {
1239+ if (activeNode .nodeType == " TracksBuilding" && isComputed) {
1240+ result = activeNode .attribute (" output" ).value
1241+ }
1242+ else if (activeNode .hasAttribute (" tracksFilename" )) {
1243+ result = activeNode .attribute (" tracksFilename" ).value
1244+ }
1245+ }
1246+ return result
1247+ })
12221248 })
12231249 } else {
12241250 // 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 {
12821308 mfeatures: mfeaturesLoader .item
12831309 mtracks: mtracksLoader .item
12841310 msfmdata: msfmDataLoader .item
1311+ featuresNodeName: (mfeaturesLoader .activeNode ) ? mfeaturesLoader .activeNode .label : " None"
1312+ tracksNodeName: (mtracksLoader .activeNode ) ? mtracksLoader .activeNode .label : " None"
1313+ sfmdataNodeName: (msfmDataLoader .activeNode ) ? msfmDataLoader .activeNode .label : " None"
12851314 }
12861315 }
12871316
0 commit comments