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) | ||||
| { | { | ||||
| BLI_assert(node->type != NODE_FRAME); | |||||
| BLI_assert(!(in_out == SOCK_IN && node->type == NODE_GROUP_INPUT)); | |||||
| BLI_assert(!(in_out == SOCK_OUT && node->type == NODE_GROUP_OUTPUT)); | |||||
| 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 | |||||