Initial public release
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
2026-09-19 21:31:36 +08:00
commit 198fcbf55b
837 changed files with 67239 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
"""Socket endpoints for the node preview."""
from .flow import socket_links
def socket_position(socket, positions, sizes):
node = socket.node
x, y = positions[node]
if node.bl_idname == "NodeReroute":
return x + 8, y - 8
return x + (sizes[node].width if socket.is_output else 0), y - sizes[node].sockets[socket]
def link_endpoints(link, positions, sizes):
start = socket_position(link.from_socket, positions, sizes)
x, y = socket_position(link.to_socket, positions, sizes)
if link.to_socket.is_multi_input:
siblings = socket_links(link.to_socket)
y -= (siblings.index(link) - (len(siblings) - 1) / 2) * 8
return start, (x, y)