mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
Merge pull request #2257 from alicevision/fix/displayResections
[Viewer3D] Bind the display status of the resection groups to QtAliceVision
This commit is contained in:
commit
bb9195f995
2 changed files with 4 additions and 1 deletions
|
@ -100,7 +100,8 @@ import Utils 1.0
|
||||||
'pointSize': Qt.binding(function() { return 0.01 * Viewer3DSettings.pointSize }),
|
'pointSize': Qt.binding(function() { return 0.01 * Viewer3DSettings.pointSize }),
|
||||||
'locatorScale': Qt.binding(function() { return Viewer3DSettings.cameraScale }),
|
'locatorScale': Qt.binding(function() { return Viewer3DSettings.cameraScale }),
|
||||||
'cameraPickingEnabled': Qt.binding(function() { return root.enabled }),
|
'cameraPickingEnabled': Qt.binding(function() { return root.enabled }),
|
||||||
'resectionId': Qt.binding(function() { return Viewer3DSettings.resectionId })
|
'resectionId': Qt.binding(function() { return Viewer3DSettings.resectionId }),
|
||||||
|
'displayResections': Qt.binding(function() { return Viewer3DSettings.displayResectionIds })
|
||||||
});
|
});
|
||||||
|
|
||||||
obj.statusChanged.connect(function() {
|
obj.statusChanged.connect(function() {
|
||||||
|
|
|
@ -45,6 +45,7 @@ SfmDataEntity {
|
||||||
for (var i = 0; i < root.cameras.length; i++) {
|
for (var i = 0; i < root.cameras.length; i++) {
|
||||||
var cam = root.cameras[i]
|
var cam = root.cameras[i]
|
||||||
var resectionId = cam.resectionId
|
var resectionId = cam.resectionId
|
||||||
|
// 4294967295 = UINT_MAX, which might occur if the value is undefined on the C++ side
|
||||||
if (resectionId === undefined || resectionId === 4294967295)
|
if (resectionId === undefined || resectionId === 4294967295)
|
||||||
continue
|
continue
|
||||||
if (resectionId > maxResectionId)
|
if (resectionId > maxResectionId)
|
||||||
|
@ -60,6 +61,7 @@ SfmDataEntity {
|
||||||
for (var i = 0; i < root.cameras.length; i++) {
|
for (var i = 0; i < root.cameras.length; i++) {
|
||||||
var cam = root.cameras[i]
|
var cam = root.cameras[i]
|
||||||
var resectionId = cam.resectionId
|
var resectionId = cam.resectionId
|
||||||
|
// 4294967295 = UINT_MAX, which might occur if the value is undefined on the C++ side
|
||||||
if (resectionId === undefined || resectionId === 4294967295)
|
if (resectionId === undefined || resectionId === 4294967295)
|
||||||
continue
|
continue
|
||||||
arr[resectionId] = arr[resectionId] + 1
|
arr[resectionId] = arr[resectionId] + 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue