diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-06-02 13:22:21 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-06-02 13:24:13 +0300 |
commit | 0e255b2e7a0497ccdb691c3aa0cf224c8ce25226 (patch) | |
tree | ce49ff5c01f6faa5d6b048d0b13a680b9b975758 /source/blender/compositor/nodes | |
parent | 5f39310323b5573a5e0b126c3efc66d6e1bffa13 (diff) |
Compositor: Fix image node alpha socket converted into operations twice
When translating image node sockets into operations, unavailable ones (with flag SOCK_UNAVAIL) are converted too. This causes an assertion to fail when selecting a multi-layer image with a "Combined" layer because it's mapping associated "Alpha" socket to operation output twice (as there is an unavailable "Image" socket used for combined too).
During compositing execution there is not need to create unavailable sockets as they are not linked or executed. Assertion fails since commit 93e2491, as now map add_new is used instead of just overwriting last mapped socket.
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r-- | source/blender/compositor/nodes/COM_ImageNode.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/compositor/nodes/COM_ImageNode.cc b/source/blender/compositor/nodes/COM_ImageNode.cc index f0bfda0f40e..df96b999115 100644 --- a/source/blender/compositor/nodes/COM_ImageNode.cc +++ b/source/blender/compositor/nodes/COM_ImageNode.cc @@ -92,8 +92,11 @@ void ImageNode::convertToOperations(NodeConverter &converter, for (int64_t index = 0; index < outputs.size(); index++) { NodeOutput *socket = outputs[index]; - NodeOperation *operation = nullptr; bNodeSocket *bnodeSocket = socket->getbNodeSocket(); + if (bnodeSocket->flag & SOCK_UNAVAIL) { + continue; + } + NodeOperation *operation = nullptr; NodeImageLayer *storage = (NodeImageLayer *)bnodeSocket->storage; RenderPass *rpass = (RenderPass *)BLI_findstring( &rl->passes, storage->pass_name, offsetof(RenderPass, name)); |