Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-20 15:35:12 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-20 15:41:24 +0300
commitc74c72101e51346ecfe1c367ba7ca789e0d1b692 (patch)
tree2e14e85c66012a3b136a65022541f839636774b2 /source/blender/nodes
parentae72a9206e988a3f4ef5d35393ce490b23db2629 (diff)
Fix compositor node links getting lost on file load for custom render passes.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/intern/node_socket.c7
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);
}
}