diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-06-16 15:04:24 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-06-16 15:04:24 +0300 |
commit | 88aa056d1ac5155b8fa20fb36598c84837bccfc2 (patch) | |
tree | c53f7af228e3582c8a6c070780f54166f7777426 /source/blender/compositor/nodes/COM_ImageNode.cc | |
parent | b66600b9f339dabf6a95641b15e7f2f4f7feca8d (diff) |
Fix: Image node alpha socket converted to operations twice
On selecting a multi-layer image with a combined pass, a "Combined"
socket is created and default combined pass socket "Image" is
disabled by setting `SOCK_UNAVAIL` flag. When converting into
operations, `ImageNode` converts alpha socket on finding any socket with
a combined pass without checking the flag.
Since commit rB93e2491ee724 an assertion fails when mapping sockets
twice because now map `add_new` is used.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D11566
Diffstat (limited to 'source/blender/compositor/nodes/COM_ImageNode.cc')
-rw-r--r-- | source/blender/compositor/nodes/COM_ImageNode.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/compositor/nodes/COM_ImageNode.cc b/source/blender/compositor/nodes/COM_ImageNode.cc index f0bfda0f40e..20476144efa 100644 --- a/source/blender/compositor/nodes/COM_ImageNode.cc +++ b/source/blender/compositor/nodes/COM_ImageNode.cc @@ -168,7 +168,7 @@ void ImageNode::convertToOperations(NodeConverter &converter, if (index == 0 && operation) { converter.addPreview(operation->getOutputSocket()); } - if (STREQ(rpass->name, RE_PASSNAME_COMBINED)) { + if (STREQ(rpass->name, RE_PASSNAME_COMBINED) && !(bnodeSocket->flag & SOCK_UNAVAIL)) { for (NodeOutput *alphaSocket : getOutputSockets()) { bNodeSocket *bnodeAlphaSocket = alphaSocket->getbNodeSocket(); if (!STREQ(bnodeAlphaSocket->name, "Alpha")) { |