mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
[ui] Reconstruction: add 'setActiveNodeOfType' method
Helper method to set a node as the active one of its type.
This commit is contained in:
parent
03e91bea49
commit
f870e252b4
2 changed files with 16 additions and 16 deletions
|
@ -552,6 +552,8 @@ ApplicationWindow {
|
|||
font.pointSize: 11
|
||||
padding: 2
|
||||
onClicked: graphEditorMenu.open()
|
||||
checkable: true
|
||||
checked: graphEditorMenu.visible
|
||||
Menu {
|
||||
id: graphEditorMenu
|
||||
y: parent.height
|
||||
|
@ -591,22 +593,8 @@ ApplicationWindow {
|
|||
readOnly: graphLocked
|
||||
|
||||
onNodeDoubleClicked: {
|
||||
if(node.nodeType === "StructureFromMotion")
|
||||
{
|
||||
_reconstruction.sfm = node;
|
||||
}
|
||||
else if(node.nodeType === "FeatureExtraction")
|
||||
{
|
||||
_reconstruction.featureExtraction = node;
|
||||
}
|
||||
else if(node.nodeType === "CameraInit")
|
||||
{
|
||||
_reconstruction.cameraInit = node;
|
||||
}
|
||||
else if(node.nodeType === "PrepareDenseScene")
|
||||
{
|
||||
_reconstruction.prepareDenseScene = node;
|
||||
}
|
||||
_reconstruction.setActiveNodeOfType(node);
|
||||
|
||||
for(var i=0; i < node.attributes.count; ++i)
|
||||
{
|
||||
var attr = node.attributes.at(i)
|
||||
|
|
|
@ -666,6 +666,18 @@ class Reconstruction(UIGraph):
|
|||
buildingIntrinsics = Property(bool, lambda self: self._buildingIntrinsics, notify=buildingIntrinsicsChanged)
|
||||
liveSfmManager = Property(QObject, lambda self: self._liveSfmManager, constant=True)
|
||||
|
||||
@Slot(QObject)
|
||||
def setActiveNodeOfType(self, node):
|
||||
""" Set node as the active node of its type. """
|
||||
if node.nodeType == "StructureFromMotion":
|
||||
self.sfm = node
|
||||
elif node.nodeType == "FeatureExtraction":
|
||||
self.featureExtraction = node
|
||||
elif node.nodeType == "CameraInit":
|
||||
self.cameraInit = node
|
||||
elif node.nodeType == "PrepareDenseScene":
|
||||
self.prepareDenseScene = node
|
||||
|
||||
def updateSfMResults(self):
|
||||
"""
|
||||
Update internal views, poses and solved intrinsics based on the current SfM node.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue