Fix T60073: can't unlink by dragging from some node input sockets.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 3 Jan 2019 17:20:30 +0000 (18:20 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 3 Jan 2019 17:21:48 +0000 (18:21 +0100)
source/blender/nodes/intern/node_socket.c

index d1903a533349e9656ececeed81165d1dca35408e..d9e1aae785a651bed459b7c0360f2c38790077d3 100644 (file)
@@ -115,8 +115,7 @@ static bNodeSocket *verify_socket_template(bNodeTree *ntree, bNode *node, int in
                if (sock->type != stemp->type) {
                        nodeModifySocketType(ntree, node, sock, stemp->type, stemp->subtype);
                }
                if (sock->type != stemp->type) {
                        nodeModifySocketType(ntree, node, sock, stemp->type, stemp->subtype);
                }
-
-               sock->limit = (stemp->limit == 0 ? 0xFFF : stemp->limit);
+               sock->limit = (stemp->limit == 0 ? (in_out == SOCK_IN ? 1 : 0xFFF) : stemp->limit);
                sock->flag |= stemp->flag;
        }
        else {
                sock->flag |= stemp->flag;
        }
        else {