Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ui] Graph: canExpandForLoop: Ensure all checks are performed on a …
Browse files Browse the repository at this point in the history
…`ListAttribute`
cbentejac committed Oct 16, 2024
1 parent e3acac4 commit d96b764
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meshroom/ui/graph.py
Original file line number Diff line number Diff line change
@@ -753,7 +753,8 @@ def duplicateNodesFrom(self, nodes):
def canExpandForLoop(self, currentEdge):
""" Check if the list attribute can be expanded by looking at all the edges connected to it. """
listAttribute = currentEdge.src.root
if not listAttribute:
# Check that the parent is indeed a ListAttribute (it could be a GroupAttribute, for instance)
if not listAttribute or not isinstance(listAttribute, ListAttribute):
return False
srcIndex = listAttribute.index(currentEdge.src)
allSrc = [e.src for e in self._graph.edges.values()]

0 comments on commit d96b764

Please sign in to comment.