fix for [#34133] Creation of an RGBA buffer from an RGB color and an alpha channel...
authorJeroen Bakker <j.bakker@atmind.nl>
Thu, 7 Feb 2013 07:24:22 +0000 (07:24 +0000)
committerJeroen Bakker <j.bakker@atmind.nl>
Thu, 7 Feb 2013 07:24:22 +0000 (07:24 +0000)
source/blender/compositor/nodes/COM_SetAlphaNode.cpp

index 709dc75..dd3ff5f 100644 (file)
 void SetAlphaNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
 {
        SetAlphaOperation *operation = new SetAlphaOperation();
-       
+
+       if (!this->getInputSocket(0)->isConnected() && this->getInputSocket(1)->isConnected()) {
+               operation->setResolutionInputSocketIndex(1);
+       }
+
        this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), 0, graph);
        this->getInputSocket(1)->relinkConnections(operation->getInputSocket(1), 1, graph);
        this->getOutputSocket(0)->relinkConnections(operation->getOutputSocket());