Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/node.c
| Show First 20 Lines • Show All 894 Lines • ▼ Show 20 Lines | |||||
| bNodeSocket *nodeAddSocket(bNodeTree *ntree, | bNodeSocket *nodeAddSocket(bNodeTree *ntree, | ||||
| bNode *node, | bNode *node, | ||||
| int in_out, | int in_out, | ||||
| const char *idname, | const char *idname, | ||||
| const char *identifier, | const char *identifier, | ||||
| const char *name) | const char *name) | ||||
| { | { | ||||
| /* No sockets on Frame nodes. */ | |||||
| if (node->type == NODE_FRAME) { | |||||
| return NULL; | |||||
| } | |||||
| ListBase *lb = (in_out == SOCK_IN ? &node->inputs : &node->outputs); | ListBase *lb = (in_out == SOCK_IN ? &node->inputs : &node->outputs); | ||||
| bNodeSocket *sock = make_socket(ntree, node, in_out, lb, idname, identifier, name); | bNodeSocket *sock = make_socket(ntree, node, in_out, lb, idname, identifier, name); | ||||
| BLI_remlink(lb, sock); /* does nothing for new socket */ | BLI_remlink(lb, sock); /* does nothing for new socket */ | ||||
| BLI_addtail(lb, sock); | BLI_addtail(lb, sock); | ||||
| node->update |= NODE_UPDATE; | node->update |= NODE_UPDATE; | ||||
| ▲ Show 20 Lines • Show All 3,565 Lines • Show Last 20 Lines | |||||