Browse Source

Fix odd traceback on NodeLinks to invalid sockets

Observed in GoMePubNew blend. I'm assuming this is an old link that was
made to a socket that has since been removed from a node...
pull/114/head
Adam Johnson 6 years ago
parent
commit
34403a9720
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 2
      korman/nodes/node_core.py

2
korman/nodes/node_core.py

@ -246,7 +246,7 @@ class PlasmaNodeBase:
continue
if allowed_sockets:
to_from_socket = link.to_socket if socket.is_output else link.from_socket
if to_from_socket.bl_idname not in allowed_sockets:
if to_from_socket is None or to_from_socket.bl_idname not in allowed_sockets:
try:
self._tattle(socket, link, "(bad socket)")
self.id_data.links.remove(link)

Loading…
Cancel
Save