File tree 3 files changed +24
-0
lines changed
3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,22 @@ FloatingPane {
339
339
}
340
340
}
341
341
342
+ // Observations visibility (if Sfm node)
343
+ MaterialToolButton {
344
+ visible: model .hasObservations
345
+ enabled: model .visible
346
+ Layout .alignment : Qt .AlignTop
347
+ Layout .fillHeight : true
348
+ text: MaterialIcons .compare_arrows
349
+ font .pointSize : 10
350
+ ToolTip .text : model .displayObservations ? " Hide observations" : " Show observations"
351
+ flat: true
352
+ opacity: model .visible ? (model .displayObservations ? 1.0 : 0.6 ) : 0.6
353
+ onClicked: {
354
+ model .displayObservations = ! model .displayObservations
355
+ }
356
+ }
357
+
342
358
// Media label and info
343
359
Item {
344
360
implicitHeight: childrenRect .height
Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ Entity {
52
52
" displayBoundingBox" : true , // for Meshing node only
53
53
" hasTransform" : false , // for SfMTransform node only
54
54
" displayTransform" : true , // for SfMTransform node only
55
+ " hasObservations" : false , // for nodes with Sfm data only
56
+ " displayObservations" : false , // for nodes with Sfm data only
55
57
" section" : " " ,
56
58
" attribute" : null ,
57
59
" entity" : null ,
@@ -183,6 +185,9 @@ Entity {
183
185
onHasTransformChanged: model .hasTransform = hasTransform
184
186
property bool displayTransform: model .displayTransform
185
187
188
+ // Specific properties to nodes with Sfm data (declared and initialized for every Entity anyway)
189
+ property bool hasObservations: nodeType === " SfMFilter" || nodeType === " StructureFromMotion"
190
+ onHasObservationsChanged: model .hasObservations = hasObservations
186
191
187
192
// Create the media
188
193
MediaLoader {
@@ -228,6 +233,7 @@ Entity {
228
233
renderMode: root .renderMode
229
234
enabled: visible
230
235
viewer2DInfo: root .viewer2DInfo
236
+ displayObservations: model .displayObservations
231
237
232
238
// QObject.destroyed signal is not accessible
233
239
// Use the object as NodeInstantiator model to be notified of its deletion
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import Utils 1.0
21
21
property int renderMode
22
22
23
23
property var viewer2DInfo: null
24
+ property bool displayObservations: false
24
25
25
26
// / Scene's current camera
26
27
property Camera camera: null
@@ -94,6 +95,7 @@ import Utils 1.0
94
95
' locatorScale' : Qt .binding (function () { return Viewer3DSettings .cameraScale }),
95
96
' viewId' : Qt .binding (function () { return _reconstruction .selectedViewId }),
96
97
' viewer2DInfo' : Qt .binding (function () {return root .viewer2DInfo }),
98
+ ' displayObservations' : Qt .binding (function () {return root .displayObservations }),
97
99
' cameraPickingEnabled' : Qt .binding (function () { return root .enabled })
98
100
});
99
101
You can’t perform that action at this time.
0 commit comments