diff options
-rw-r--r-- | source/blender/nodes/intern/node_socket.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c index 01c642b063d..5b5eadc1a99 100644 --- a/source/blender/nodes/intern/node_socket.c +++ b/source/blender/nodes/intern/node_socket.c @@ -183,13 +183,14 @@ void node_verify_socket_templates(bNodeTree *ntree, bNode *node) { bNodeType *ntype = node->typeinfo; /* Don't try to match socket lists when there are no templates. - * This prevents group node sockets from being removed, without the need to explicitly - * check the node type here. + * This prevents dynamically generated sockets to be removed, like for + * group, image or render layer nodes. We have an explicit check for the + * render layer node since it still has fixed sockets too. */ if (ntype) { if (ntype->inputs && ntype->inputs[0].type >= 0) verify_socket_template_list(ntree, node, SOCK_IN, &node->inputs, ntype->inputs); - if (ntype->outputs && ntype->outputs[0].type >= 0) + if (ntype->outputs && ntype->outputs[0].type >= 0 && node->type != CMP_NODE_R_LAYERS) verify_socket_template_list(ntree, node, SOCK_OUT, &node->outputs, ntype->outputs); } } |