Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_CombineColorNode.cc
| Show All 31 Lines | void CombineColorNode::convertToOperations(NodeConverter &converter, | ||||
| NodeInput *inputRSocket = this->getInputSocket(0); | NodeInput *inputRSocket = this->getInputSocket(0); | ||||
| NodeInput *inputGSocket = this->getInputSocket(1); | NodeInput *inputGSocket = this->getInputSocket(1); | ||||
| NodeInput *inputBSocket = this->getInputSocket(2); | NodeInput *inputBSocket = this->getInputSocket(2); | ||||
| NodeInput *inputASocket = this->getInputSocket(3); | NodeInput *inputASocket = this->getInputSocket(3); | ||||
| NodeOutput *outputSocket = this->getOutputSocket(0); | NodeOutput *outputSocket = this->getOutputSocket(0); | ||||
| CombineChannelsOperation *operation = new CombineChannelsOperation(); | CombineChannelsOperation *operation = new CombineChannelsOperation(); | ||||
| if (inputRSocket->isLinked()) { | if (inputRSocket->isLinked()) { | ||||
| operation->setResolutionInputSocketIndex(0); | operation->set_canvas_input_index(0); | ||||
| } | } | ||||
| else if (inputGSocket->isLinked()) { | else if (inputGSocket->isLinked()) { | ||||
| operation->setResolutionInputSocketIndex(1); | operation->set_canvas_input_index(1); | ||||
| } | } | ||||
| else if (inputBSocket->isLinked()) { | else if (inputBSocket->isLinked()) { | ||||
| operation->setResolutionInputSocketIndex(2); | operation->set_canvas_input_index(2); | ||||
| } | } | ||||
| else { | else { | ||||
| operation->setResolutionInputSocketIndex(3); | operation->set_canvas_input_index(3); | ||||
| } | } | ||||
| converter.addOperation(operation); | converter.addOperation(operation); | ||||
| converter.mapInputSocket(inputRSocket, operation->getInputSocket(0)); | converter.mapInputSocket(inputRSocket, operation->getInputSocket(0)); | ||||
| converter.mapInputSocket(inputGSocket, operation->getInputSocket(1)); | converter.mapInputSocket(inputGSocket, operation->getInputSocket(1)); | ||||
| converter.mapInputSocket(inputBSocket, operation->getInputSocket(2)); | converter.mapInputSocket(inputBSocket, operation->getInputSocket(2)); | ||||
| converter.mapInputSocket(inputASocket, operation->getInputSocket(3)); | converter.mapInputSocket(inputASocket, operation->getInputSocket(3)); | ||||
| Show All 36 Lines | |||||