We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e380e6f commit 6952ec5Copy full SHA for 6952ec5
api/arrange.py
@@ -1,6 +1,6 @@
1
import bpy
2
import typing
3
-from collections import deque
+from collections import deque, Counter
4
5
def _arrange(node_tree, padding: typing.Tuple[float, float] = (50, 25)):
6
# Organize the nodes into columns based on their links.
@@ -23,7 +23,7 @@ def topo_sort(graph):
23
return topo_order
24
25
graph = { node:set() for node in node_tree.nodes }
26
- node_input_link_count = { i:0 for node in node_tree.nodes for i in node.inputs }
+ node_input_link_count = Counter()
27
for link in node_tree.links:
28
graph[link.from_node].add(link.to_node)
29
node_input_link_count[link.to_socket] += 1
0 commit comments