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
This commit is contained in:
@@ -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")) {
|
||||
|
Reference in New Issue
Block a user