Modified behavior when replacing input links: The new target socket for the existing...
authorLukas Toenne <lukas.toenne@googlemail.com>
Sun, 17 Jul 2011 19:43:14 +0000 (19:43 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Sun, 17 Jul 2011 19:43:14 +0000 (19:43 +0000)
source/blender/editors/space_node/node_edit.c

index 94263091d3b1e6c64482cd002a9bfca3ee80c688..abc7b273ec991bc248be1a4f2c87ebe3686fa907 100644 (file)
@@ -2118,9 +2118,9 @@ static void node_remove_extra_links(SpaceNode *snode, bNodeSocket *tsock, bNodeL
                if(tlink) {
                        /* try to move the existing link to the next available socket */
                        if (tlink->tonode) {
-                               /* is there a free input socket with same type? */
+                               /* is there a free input socket with the target type? */
                                for(sock= tlink->tonode->inputs.first; sock; sock= sock->next) {
-                                       if(sock->type==tlink->fromsock->type)
+                                       if(sock->type==tlink->tosock->type)
                                                if(nodeCountSocketLinks(snode->edittree, sock) < sock->limit)
                                                        break;
                                }