mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-19 12:06:28 +02:00
[commands] unify naming on edges source / destination
This commit is contained in:
parent
45f04e14d2
commit
b27db8fc7a
1 changed files with 6 additions and 5 deletions
|
@ -104,13 +104,14 @@ class RemoveNodeCommand(GraphCommand):
|
|||
parent=self.graph, **self.nodeDesc["attributes"]
|
||||
), self.nodeName)
|
||||
assert (node.getName() == self.nodeName)
|
||||
|
||||
# recreate edges deleted on node removal
|
||||
# edges having this node as destination could be retrieved from node description
|
||||
# but we're missing edges starting from this node
|
||||
for key, value in self.edges.items():
|
||||
iNode, iAttr = key.split(".")
|
||||
oNode, oAttr = value.split(".")
|
||||
self.graph.addEdge(self.graph.node(oNode).attribute(oAttr),
|
||||
self.graph.node(iNode).attribute(iAttr))
|
||||
dstNode, dstAttr = key.split(".")
|
||||
srcNode, srcAttr = value.split(".")
|
||||
self.graph.addEdge(self.graph.node(srcNode).attribute(srcAttr),
|
||||
self.graph.node(dstNode).attribute(dstAttr))
|
||||
|
||||
node.updateInternals()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue