Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_relationships.c
| Show First 20 Lines • Show All 432 Lines • ▼ Show 20 Lines | if (link) { | ||||
| /* find a socket after the previously connected socket */ | /* find a socket after the previously connected socket */ | ||||
| for (sock = sock->next; sock; sock = sock->next) | for (sock = sock->next; sock; sock = sock->next) | ||||
| if (!nodeSocketIsHidden(sock)) | if (!nodeSocketIsHidden(sock)) | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| if (tonode) { | |||||
| /* Find a selected socket that overrides the socket to connect to */ | |||||
| for (bNodeSocket *sock2 = tonode->outputs.first; sock2; sock2 = sock2->next) { | |||||
| if (!nodeSocketIsHidden(sock2) && sock2->flag & SELECT) { | |||||
| sock = sock2; | |||||
| break; | |||||
| } | |||||
| } | |||||
| } | |||||
| /* find a socket starting from the first socket */ | /* find a socket starting from the first socket */ | ||||
| if (!sock) { | if (!sock) { | ||||
| for (sock = tonode->outputs.first; sock; sock = sock->next) | for (sock = tonode->outputs.first; sock; sock = sock->next) | ||||
| if (!nodeSocketIsHidden(sock)) | if (!nodeSocketIsHidden(sock)) | ||||
| break; | break; | ||||
| } | } | ||||
| if (sock) { | if (sock) { | ||||
| ▲ Show 20 Lines • Show All 1,432 Lines • Show Last 20 Lines | |||||