mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-31 23:38:48 +02:00
[ui] Value of current edge iteration and TaskManager protected
This commit is contained in:
parent
0d397b4baf
commit
0d346ab2da
3 changed files with 17 additions and 8 deletions
|
@ -764,24 +764,22 @@ class UIGraph(QObject):
|
|||
return False
|
||||
return True
|
||||
|
||||
@Slot(Edge)
|
||||
@Slot(Edge, result=Edge)
|
||||
def expandForLoop(self, currentEdge):
|
||||
""" Expand 'node' by creating all its output nodes. """
|
||||
with self.groupedGraphModification("Expand For Loop Node"):
|
||||
listAttribute = currentEdge.src.root
|
||||
dst = currentEdge.dst
|
||||
|
||||
# First, replace the edge with the first element of the list
|
||||
currentEdge = self.replaceEdge(currentEdge, listAttribute.at(0), dst)
|
||||
|
||||
srcIndex = listAttribute.index(currentEdge.src)
|
||||
dst = currentEdge.dst
|
||||
for i in range(1, len(listAttribute)):
|
||||
duplicates = self.duplicateNodesFrom(dst.node)
|
||||
newNode = duplicates[0]
|
||||
previousEdge = self.graph.edge(newNode.attribute(dst.name))
|
||||
self.replaceEdge(previousEdge, listAttribute.at(i), previousEdge.dst)
|
||||
|
||||
# Last, replace the edge with the first element of the list
|
||||
return self.replaceEdge(currentEdge, listAttribute.at(0), dst)
|
||||
|
||||
@Slot(Edge)
|
||||
def collapseForLoop(self, currentEdge):
|
||||
""" Collapse 'node' by removing all its output nodes. """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue