mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[ui] Sync camera gizmo in Viewer3D enabled
This commit is contained in:
parent
361f777118
commit
369143eca1
6 changed files with 19 additions and 2 deletions
|
@ -112,7 +112,8 @@ import Utils 1.0
|
|||
'locatorScale': Qt.binding(function() { return Viewer3DSettings.cameraScale }),
|
||||
'cameraPickingEnabled': Qt.binding(function() { return root.enabled }),
|
||||
'resectionId': Qt.binding(function() { return Viewer3DSettings.resectionId }),
|
||||
'displayResections': Qt.binding(function() { return Viewer3DSettings.displayResectionIds })
|
||||
'displayResections': Qt.binding(function() { return Viewer3DSettings.displayResectionIds }),
|
||||
'syncPickedViewId': Qt.binding(function() { return Viewer3DSettings.syncWithPickedViewId })
|
||||
});
|
||||
|
||||
obj.statusChanged.connect(function() {
|
||||
|
|
|
@ -12,6 +12,8 @@ SfmDataEntity {
|
|||
id: root
|
||||
|
||||
property bool cameraPickingEnabled: true
|
||||
property bool syncPickedViewId: false
|
||||
|
||||
// filter out non-reconstructed cameras
|
||||
skipHidden: true
|
||||
|
||||
|
@ -22,6 +24,9 @@ SfmDataEntity {
|
|||
function onSelectedViewIdChanged() {
|
||||
root.cameraSelected(_reconstruction.selectedViewId)
|
||||
}
|
||||
function onSelectedViewpointChanged() {
|
||||
root.cameraSelected(_reconstruction.pickedViewId)
|
||||
}
|
||||
}
|
||||
|
||||
function spawnCameraSelectors() {
|
||||
|
@ -96,7 +101,7 @@ SfmDataEntity {
|
|||
},
|
||||
PhongMaterial{
|
||||
id: mat
|
||||
ambient: _reconstruction && viewId === _reconstruction.selectedViewId ? activePalette.highlight : customColor // "#CCC"
|
||||
ambient: _reconstruction && (viewId === _reconstruction.selectedViewId || (viewId === _reconstruction.pickedViewId && syncPickedViewId)) ? activePalette.highlight : customColor // "#CCC"
|
||||
diffuse: cameraPicker.containsMouse ? Qt.lighter(activePalette.highlight, 1.2) : ambient
|
||||
},
|
||||
ObjectPicker {
|
||||
|
|
|
@ -51,6 +51,7 @@ Item {
|
|||
property bool displayOrigin: false
|
||||
// Camera
|
||||
property bool syncViewpointCamera: false
|
||||
property bool syncWithPickedViewId: false // Sync active camera with picked view ID from sequence player if the setting is enabled
|
||||
property bool viewpointImageOverlay: true
|
||||
property real viewpointImageOverlayOpacity: 0.5
|
||||
readonly property bool showViewpointImageOverlay: syncViewpointCamera && viewpointImageOverlay
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue