Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp
| Show All 31 Lines | |||||
| void LuminanceMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const | void LuminanceMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const | ||||
| { | { | ||||
| bNode *editorsnode = getbNode(); | bNode *editorsnode = getbNode(); | ||||
| NodeInput *inputSocket = this->getInputSocket(0); | NodeInput *inputSocket = this->getInputSocket(0); | ||||
| NodeOutput *outputSocketImage = this->getOutputSocket(0); | NodeOutput *outputSocketImage = this->getOutputSocket(0); | ||||
| NodeOutput *outputSocketMatte = this->getOutputSocket(1); | NodeOutput *outputSocketMatte = this->getOutputSocket(1); | ||||
| ConvertRGBToYUVOperation *rgbToYUV = new ConvertRGBToYUVOperation(); | |||||
| LuminanceMatteOperation *operationSet = new LuminanceMatteOperation(); | LuminanceMatteOperation *operationSet = new LuminanceMatteOperation(); | ||||
| operationSet->setSettings((NodeChroma *)editorsnode->storage); | operationSet->setSettings((NodeChroma *)editorsnode->storage); | ||||
| converter.addOperation(rgbToYUV); | |||||
| converter.addOperation(operationSet); | converter.addOperation(operationSet); | ||||
| converter.mapInputSocket(inputSocket, rgbToYUV->getInputSocket(0)); | converter.mapInputSocket(inputSocket, operationSet->getInputSocket(0)); | ||||
| converter.addLink(rgbToYUV->getOutputSocket(), operationSet->getInputSocket(0)); | |||||
| converter.mapOutputSocket(outputSocketMatte, operationSet->getOutputSocket(0)); | converter.mapOutputSocket(outputSocketMatte, operationSet->getOutputSocket(0)); | ||||
| SetAlphaOperation *operation = new SetAlphaOperation(); | SetAlphaOperation *operation = new SetAlphaOperation(); | ||||
| converter.addOperation(operation); | converter.addOperation(operation); | ||||
| converter.mapInputSocket(inputSocket, operation->getInputSocket(0)); | converter.mapInputSocket(inputSocket, operation->getInputSocket(0)); | ||||
| converter.addLink(operationSet->getOutputSocket(), operation->getInputSocket(1)); | converter.addLink(operationSet->getOutputSocket(), operation->getInputSocket(1)); | ||||
| converter.mapOutputSocket(outputSocketImage, operation->getOutputSocket()); | converter.mapOutputSocket(outputSocketImage, operation->getOutputSocket()); | ||||
| converter.addPreview(operation->getOutputSocket()); | converter.addPreview(operation->getOutputSocket()); | ||||
| } | } | ||||