mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-13 16:22:13 +02:00
Merge pull request #2396 from alicevision/fix/getLatestSfMNode
[ui/core] Fix get latest SfM node for previz
This commit is contained in:
commit
45fd86e51b
2 changed files with 5 additions and 3 deletions
|
@ -1114,7 +1114,7 @@ class Graph(BaseObject):
|
|||
self._computationBlocked.clear()
|
||||
|
||||
compatNodes = []
|
||||
visitor = Visitor(reverse=False, dependenciesOnly=True)
|
||||
visitor = Visitor(reverse=False, dependenciesOnly=False)
|
||||
|
||||
def discoverVertex(vertex, graph):
|
||||
# initialize depths
|
||||
|
|
|
@ -680,6 +680,8 @@ class Reconstruction(UIGraph):
|
|||
nodes = self._graph.dfsOnDiscover(startNodes=[startNode], filterTypes=nodeTypes, reverse=True)[0]
|
||||
if not nodes:
|
||||
return None
|
||||
# order the nodes according to their depth in the graph, then according to their name
|
||||
nodes.sort(key=lambda n: (n.depth, n.name))
|
||||
node = nodes[-1]
|
||||
if preferredStatus:
|
||||
node = next((n for n in reversed(nodes) if n.getGlobalStatus() == preferredStatus), node)
|
||||
|
@ -1019,7 +1021,7 @@ class Reconstruction(UIGraph):
|
|||
for category, node in nodesByCategory.items():
|
||||
self.activeNodes.get(category).node = node
|
||||
if category == 'sfm':
|
||||
self.setSfm(node)
|
||||
self.setActiveNode(self.lastSfmNode())
|
||||
for node in nodes:
|
||||
if node is None:
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue