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 @@ -496,6 +496,22 @@ FloatingPane {
496
496
}
497
497
}
498
498
499
+ // Observations visibility (if Sfm node)
500
+ MaterialToolButton {
501
+ visible: model .hasObservations
502
+ enabled: model .visible
503
+ Layout .alignment : Qt .AlignTop
504
+ Layout .fillHeight : true
505
+ text: MaterialIcons .compare_arrows
506
+ font .pointSize : 10
507
+ ToolTip .text : model .displayObservations ? " Hide observations" : " Show observations"
508
+ flat: true
509
+ opacity: model .visible ? (model .displayObservations ? 1.0 : 0.6 ) : 0.6
510
+ onClicked: {
511
+ model .displayObservations = ! model .displayObservations
512
+ }
513
+ }
514
+
499
515
// Media label and info
500
516
Item {
501
517
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 ,
@@ -185,6 +187,9 @@ Entity {
185
187
onHasTransformChanged: model .hasTransform = hasTransform
186
188
property bool displayTransform: model .displayTransform
187
189
190
+ // Specific properties to nodes with Sfm data (declared and initialized for every Entity anyway)
191
+ property bool hasObservations: nodeType === " SfMFilter" || nodeType === " StructureFromMotion"
192
+ onHasObservationsChanged: model .hasObservations = hasObservations
188
193
189
194
// Create the medias
190
195
MediaLoader {
@@ -230,6 +235,7 @@ Entity {
230
235
renderMode: root .renderMode
231
236
enabled: visible
232
237
viewer2DInfo: root .viewer2DInfo
238
+ displayObservations: model .displayObservations
233
239
234
240
// QObject.destroyed signal is not accessible
235
241
// 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
@@ -103,6 +104,7 @@ import Utils 1.0
103
104
' locatorScale' : Qt .binding (function () { return Viewer3DSettings .cameraScale }),
104
105
' viewId' : Qt .binding (function () { return _reconstruction .selectedViewId }),
105
106
' viewer2DInfo' : Qt .binding (function () {return root .viewer2DInfo }),
107
+ ' displayObservations' : Qt .binding (function () {return root .displayObservations }),
106
108
' cameraPickingEnabled' : Qt .binding (function () { return root .enabled }),
107
109
' resectionId' : Qt .binding (function () { return Viewer3DSettings .resectionId }),
108
110
' displayResections' : Qt .binding (function () { return Viewer3DSettings .displayResectionIds })
You can’t perform that action at this time.
0 commit comments