Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
| Show All 14 Lines | |||||
| * | * | ||||
| * Copyright 2012, Blender Foundation. | * Copyright 2012, Blender Foundation. | ||||
| */ | */ | ||||
| #include "COM_ChannelMatteNode.h" | #include "COM_ChannelMatteNode.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "COM_ChannelMatteOperation.h" | #include "COM_ChannelMatteOperation.h" | ||||
| #include "COM_ConvertOperation.h" | #include "COM_ConvertOperation.h" | ||||
| #include "COM_SetAlphaOperation.h" | #include "COM_SetAlphaMultiplyOperation.h" | ||||
| ChannelMatteNode::ChannelMatteNode(bNode *editorNode) : Node(editorNode) | ChannelMatteNode::ChannelMatteNode(bNode *editorNode) : Node(editorNode) | ||||
| { | { | ||||
| /* pass */ | /* pass */ | ||||
| } | } | ||||
| void ChannelMatteNode::convertToOperations(NodeConverter &converter, | void ChannelMatteNode::convertToOperations(NodeConverter &converter, | ||||
| const CompositorContext & /*context*/) const | const CompositorContext & /*context*/) const | ||||
| Show All 27 Lines | default: | ||||
| break; | break; | ||||
| } | } | ||||
| ChannelMatteOperation *operation = new ChannelMatteOperation(); | ChannelMatteOperation *operation = new ChannelMatteOperation(); | ||||
| /* pass the ui properties to the operation */ | /* pass the ui properties to the operation */ | ||||
| operation->setSettings((NodeChroma *)node->storage, node->custom2); | operation->setSettings((NodeChroma *)node->storage, node->custom2); | ||||
| converter.addOperation(operation); | converter.addOperation(operation); | ||||
| SetAlphaOperation *operationAlpha = new SetAlphaOperation(); | SetAlphaMultiplyOperation *operationAlpha = new SetAlphaMultiplyOperation(); | ||||
| converter.addOperation(operationAlpha); | converter.addOperation(operationAlpha); | ||||
| if (convert != nullptr) { | if (convert != nullptr) { | ||||
| converter.addOperation(convert); | converter.addOperation(convert); | ||||
| converter.mapInputSocket(inputSocketImage, convert->getInputSocket(0)); | converter.mapInputSocket(inputSocketImage, convert->getInputSocket(0)); | ||||
| converter.addLink(convert->getOutputSocket(), operation->getInputSocket(0)); | converter.addLink(convert->getOutputSocket(), operation->getInputSocket(0)); | ||||
| converter.addLink(convert->getOutputSocket(), operationAlpha->getInputSocket(0)); | converter.addLink(convert->getOutputSocket(), operationAlpha->getInputSocket(0)); | ||||
| Show All 20 Lines | |||||