From e699546bdeccd79d28d14a04cfdf1849ff6caed0 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 3 Nov 2020 15:09:14 +0100 Subject: [PATCH] Fix T81756: relinking multiple links to group input removes links The links where added to the socket one after the other. However, the virtual socket had a link limit of 1, so whenever a new link was added, the previously added one was removed. There is not really a reason for why the link limit should be 1 instead of something higher. I'm setting it to the max value: `0xFFF`. I'm also setting the `input_link_limit` to that value. Blender does not need this currently, but addons might have input sockets that allow more than one incident link. --- source/blender/nodes/intern/node_socket.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc index 0cedc6597c8..116177a54b7 100644 --- a/source/blender/nodes/intern/node_socket.cc +++ b/source/blender/nodes/intern/node_socket.cc @@ -543,8 +543,8 @@ static bNodeSocketType *make_socket_type_virtual(void) ED_init_node_socket_type_virtual(stype); stype->use_link_limits_of_type = true; - stype->input_link_limit = 1; - stype->output_link_limit = 1; + stype->input_link_limit = 0xFFF; + stype->output_link_limit = 0xFFF; return stype; }