mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-21 21:16:29 +02:00
Don't lock graph and node editor while computing nodes
Add possibilty to, while computing nodes: add more nodes to the task manager, edit, duplicate and remove nodes without breaking the tasks that are submitted
This commit is contained in:
parent
51d6c18840
commit
c00db25c23
5 changed files with 94 additions and 28 deletions
|
@ -893,6 +893,21 @@ class Graph(BaseObject):
|
|||
self.dfs(visitor=visitor, startNodes=[startNode], reverse=True)
|
||||
return nodes, edges
|
||||
|
||||
@Slot(Node, result="QVariantList")
|
||||
def onlyNodesFromNode(self, startNode, filterType=None):
|
||||
nodes = []
|
||||
edges = []
|
||||
visitor = Visitor()
|
||||
|
||||
def discoverVertex(vertex, graph):
|
||||
if not filterType or vertex.nodeType == filterType:
|
||||
nodes.append(vertex)
|
||||
|
||||
visitor.discoverVertex = discoverVertex
|
||||
visitor.examineEdge = lambda edge, graph: edges.append(edge)
|
||||
self.dfs(visitor=visitor, startNodes=[startNode], reverse=True)
|
||||
return nodes
|
||||
|
||||
def _applyExpr(self):
|
||||
with GraphModification(self):
|
||||
for node in self._nodes:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue