diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_IDMaskOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_IDMaskOperation.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_IDMaskOperation.cpp b/source/blender/compositor/operations/COM_IDMaskOperation.cpp index 198248e35a3..834ca4fc5ed 100644 --- a/source/blender/compositor/operations/COM_IDMaskOperation.cpp +++ b/source/blender/compositor/operations/COM_IDMaskOperation.cpp @@ -22,16 +22,19 @@ #include "COM_IDMaskOperation.h" -IDMaskOperation::IDMaskOperation(): NodeOperation() { +IDMaskOperation::IDMaskOperation(): NodeOperation() +{ this->addInputSocket(COM_DT_VALUE); this->addOutputSocket(COM_DT_VALUE); this->inputProgram = NULL; } -void IDMaskOperation::initExecution() { +void IDMaskOperation::initExecution() +{ this->inputProgram = this->getInputSocketReader(0); } -void IDMaskOperation::executePixel(float* color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +void IDMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +{ float inputValue[4]; this->inputProgram->read(inputValue, x, y, sampler, inputBuffers); @@ -39,7 +42,8 @@ void IDMaskOperation::executePixel(float* color, float x, float y, PixelSampler color[0] = a; } -void IDMaskOperation::deinitExecution() { +void IDMaskOperation::deinitExecution() +{ this->inputProgram = NULL; } |