Skip to content

Commit

Permalink
[ui] ImageGallery: Add an option in the menu to set the SfM initial pair
Browse files Browse the repository at this point in the history
Add a "SfM: Define Initial Pair" sub-menu in the Image Gallery menu that is
only enabled if the currently active group contains a StructureFromMotion
node. Clicking "A" or "B" will automatically set the selected image's view
ID as a part of the initial pair.
  • Loading branch information
cbentejac committed Mar 15, 2023
1 parent b42e7cb commit 790ede0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions meshroom/ui/qml/ImageGallery/ImageDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@ Item {
enabled: !root.readOnly && _viewpoint.viewId != -1 && _reconstruction && activeNode
onClicked: activeNode.attribute("transformation").value = _viewpoint.viewId.toString()
}
Menu {
id: sfmSetPairMenu
title: "SfM: Define Initial Pair"
property var activeNode: _reconstruction ? _reconstruction.activeNodes.get("StructureFromMotion").node : null
enabled: !root.readOnly && _viewpoint.viewId != -1 && _reconstruction && activeNode

MenuItem {
text: "A"
onClicked: sfmSetPairMenu.activeNode.attribute("initialPairA").value = _viewpoint.viewId.toString()
}

MenuItem {
text: "B"
onClicked: sfmSetPairMenu.activeNode.attribute("initialPairB").value = _viewpoint.viewId.toString()
}
}
}

ColumnLayout {
Expand Down

0 comments on commit 790ede0

Please sign in to comment.