Skip to content

Commit 11e8bfd

Browse files
committed
updated doc strings
1 parent 457b735 commit 11e8bfd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

NodeGraphQt/base/graph.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,14 +1606,20 @@ def _compute_node_rank(nodes, down_stream=True):
16061606
NodeGraph._update_node_rank(node, nodes_rank, down_stream)
16071607
return nodes_rank
16081608

1609-
def auto_layout_nodes(self, nodes=None, down_stream=True):
1609+
def auto_layout_nodes(self, nodes=None, down_stream=True, start_nodes=None):
16101610
"""
16111611
Auto layout the nodes in the node graph.
16121612
1613+
Note:
1614+
If the node graph is acyclic then the ``start_nodes`` will need
1615+
to be specified.
1616+
16131617
Args:
16141618
nodes (list[NodeGraphQt.BaseNode]): list of nodes to auto layout
16151619
if nodes is None then all nodes is layed out.
16161620
down_stream (bool): false to layout up stream.
1621+
start_nodes (list[NodeGraphQt.BaseNode]):
1622+
list of nodes to start the auto layout from (Optional).
16171623
"""
16181624
self.begin_undo('Auto Layout Nodes')
16191625

@@ -1625,7 +1631,7 @@ def auto_layout_nodes(self, nodes=None, down_stream=True):
16251631
}
16261632
filtered_nodes = [n for n in nodes if not isinstance(n, BackdropNode)]
16271633

1628-
start_nodes = []
1634+
start_nodes = start_nodes or []
16291635
if down_stream:
16301636
start_nodes += [
16311637
n for n in filtered_nodes

0 commit comments

Comments
 (0)