diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_InvertOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_InvertOperation.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_InvertOperation.cpp b/source/blender/compositor/operations/COM_InvertOperation.cpp index baf8699603c..982fe1a5450 100644 --- a/source/blender/compositor/operations/COM_InvertOperation.cpp +++ b/source/blender/compositor/operations/COM_InvertOperation.cpp @@ -22,7 +22,8 @@ #include "COM_InvertOperation.h" -InvertOperation::InvertOperation(): NodeOperation() { +InvertOperation::InvertOperation(): NodeOperation() +{ this->addInputSocket(COM_DT_VALUE); this->addInputSocket(COM_DT_COLOR); this->addOutputSocket(COM_DT_COLOR); @@ -32,12 +33,14 @@ InvertOperation::InvertOperation(): NodeOperation() { this->alpha = false; setResolutionInputSocketIndex(1); } -void InvertOperation::initExecution() { +void InvertOperation::initExecution() +{ this->inputValueProgram = this->getInputSocketReader(0); this->inputColorProgram = this->getInputSocketReader(1); } -void InvertOperation::executePixel(float* out, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +void InvertOperation::executePixel(float *out, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +{ float inputValue[4]; float inputColor[4]; this->inputValueProgram->read(inputValue, x, y, sampler, inputBuffers); @@ -64,7 +67,8 @@ void InvertOperation::executePixel(float* out, float x, float y, PixelSampler sa } -void InvertOperation::deinitExecution() { +void InvertOperation::deinitExecution() +{ this->inputValueProgram = NULL; this->inputColorProgram = NULL; } |