Skip to content

Commit 0e6e68c

Browse files
committed
feat: order links according to multi-input sort ID
1 parent a9e8770 commit 0e6e68c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ntp_operator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,9 @@ def _init_links(self, node_tree: NodeTree) -> None:
11751175
links = node_tree.links
11761176
if links:
11771177
self._write(f"#initialize {nt_var} links")
1178+
if hasattr(links[0], "multi_input_sort_id"):
1179+
# generate links in the correct order for multi input sockets
1180+
links = sorted(links, key=lambda link: link.multi_input_sort_id)
11781181

11791182
for link in links:
11801183
in_node_var = self._node_vars[link.from_node]

0 commit comments

Comments
 (0)