diff options
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_image.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c index 10de192277b..382459993b7 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.c +++ b/source/blender/nodes/composite/nodes/node_composite_image.c @@ -86,6 +86,12 @@ static void cmp_node_image_add_pass_output(bNodeTree *ntree, { bNodeSocket *sock = BLI_findstring(&node->outputs, name, offsetof(bNodeSocket, name)); + /* Replace if types don't match. */ + if (sock && sock->type != type) { + nodeRemoveSocket(ntree, node, sock); + sock = NULL; + } + /* Create socket if it doesn't exist yet. */ if (sock == NULL) { if (rres_index >= 0) { |