Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_KeyingNode.cpp
| Show All 26 Lines | |||||
| #include "COM_MathBaseOperation.h" | #include "COM_MathBaseOperation.h" | ||||
| #include "COM_ConvertOperation.h" | #include "COM_ConvertOperation.h" | ||||
| #include "COM_SetValueOperation.h" | #include "COM_SetValueOperation.h" | ||||
| #include "COM_DilateErodeOperation.h" | #include "COM_DilateErodeOperation.h" | ||||
| #include "COM_KeyingSetAlphaOperation.h" | #include "COM_SetAlphaMultiplyOperation.h" | ||||
| #include "COM_GaussianAlphaXBlurOperation.h" | #include "COM_GaussianAlphaXBlurOperation.h" | ||||
| #include "COM_GaussianAlphaYBlurOperation.h" | #include "COM_GaussianAlphaYBlurOperation.h" | ||||
| KeyingNode::KeyingNode(bNode *editorNode) : Node(editorNode) | KeyingNode::KeyingNode(bNode *editorNode) : Node(editorNode) | ||||
| { | { | ||||
| /* pass */ | /* pass */ | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 274 Lines • ▼ Show 20 Lines | if (keying_data->feather_distance != 0) { | ||||
| postprocessedMatte = setupFeather(converter, | postprocessedMatte = setupFeather(converter, | ||||
| context, | context, | ||||
| postprocessedMatte, | postprocessedMatte, | ||||
| keying_data->feather_falloff, | keying_data->feather_falloff, | ||||
| keying_data->feather_distance); | keying_data->feather_distance); | ||||
| } | } | ||||
| /* set alpha channel to output image */ | /* set alpha channel to output image */ | ||||
| KeyingSetAlphaOperation *alphaOperation = new KeyingSetAlphaOperation(); | SetAlphaMultiplyOperation *alphaOperation = new SetAlphaMultiplyOperation(); | ||||
| converter.addOperation(alphaOperation); | converter.addOperation(alphaOperation); | ||||
| converter.mapInputSocket(inputImage, alphaOperation->getInputSocket(0)); | converter.mapInputSocket(inputImage, alphaOperation->getInputSocket(0)); | ||||
| converter.addLink(postprocessedMatte, alphaOperation->getInputSocket(1)); | converter.addLink(postprocessedMatte, alphaOperation->getInputSocket(1)); | ||||
| postprocessedImage = alphaOperation->getOutputSocket(); | postprocessedImage = alphaOperation->getOutputSocket(); | ||||
| /* despill output image */ | /* despill output image */ | ||||
| Show All 16 Lines | |||||