mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-01 15:58:36 +02:00
[ui] Add a clear images button in the file menu
Add a button to clear all viewpoints and intrinsics of all camera inits present in the project.
This commit is contained in:
parent
d675f75954
commit
f024ae30e5
1 changed files with 24 additions and 0 deletions
|
@ -494,6 +494,30 @@ ApplicationWindow {
|
|||
shortcut: "Ctrl+I"
|
||||
onTriggered: importFilesDialog.open()
|
||||
}
|
||||
|
||||
Action {
|
||||
id: clearActionItem
|
||||
text: "Clear Images"
|
||||
onTriggered: {
|
||||
//Loop through all the camera inits
|
||||
for(var i = 0 ; i < _reconstruction.cameraInits.count; i++){
|
||||
var cameraInit = _reconstruction.cameraInits.at(i)
|
||||
|
||||
//Delete all viewpoints
|
||||
var viewpoints = cameraInit.attribute('viewpoints')
|
||||
for(var y = viewpoints.value.count - 1 ; y >= 0 ; y--){
|
||||
_reconstruction.removeAttribute(viewpoints.value.at(y))
|
||||
}
|
||||
|
||||
//Delete all intrinsics
|
||||
var intrinsics = cameraInit.attribute('intrinsics')
|
||||
for(var z = intrinsics.value.count - 1 ; z >= 0 ; z--){
|
||||
_reconstruction.removeAttribute(intrinsics.value.at(z))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Action {
|
||||
id: saveAction
|
||||
text: "Save"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue