diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 05:22:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 05:22:05 +0400 |
commit | 6a1d82490e49d1f5d73b5082516b087d44010fb8 (patch) | |
tree | 0650cce3c1d47db6c5de1f4f2ba05b619c412f09 /source/blender/compositor/operations/COM_InvertOperation.cpp | |
parent | 7a0ab62d3f65f3b28da2a6ba9916c21132f8ea0d (diff) |
use m_ prefix for compositor class members (all compositor operations).
Diffstat (limited to 'source/blender/compositor/operations/COM_InvertOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_InvertOperation.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/compositor/operations/COM_InvertOperation.cpp b/source/blender/compositor/operations/COM_InvertOperation.cpp index 6142959a12e..9e9c2522d66 100644 --- a/source/blender/compositor/operations/COM_InvertOperation.cpp +++ b/source/blender/compositor/operations/COM_InvertOperation.cpp @@ -27,29 +27,29 @@ InvertOperation::InvertOperation() : NodeOperation() this->addInputSocket(COM_DT_VALUE); this->addInputSocket(COM_DT_COLOR); this->addOutputSocket(COM_DT_COLOR); - this->inputValueProgram = NULL; - this->inputColorProgram = NULL; - this->color = true; - this->alpha = false; + this->m_inputValueProgram = NULL; + this->m_inputColorProgram = NULL; + this->m_color = true; + this->m_alpha = false; setResolutionInputSocketIndex(1); } void InvertOperation::initExecution() { - this->inputValueProgram = this->getInputSocketReader(0); - this->inputColorProgram = this->getInputSocketReader(1); + this->m_inputValueProgram = this->getInputSocketReader(0); + this->m_inputColorProgram = this->getInputSocketReader(1); } 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); - this->inputColorProgram->read(inputColor, x, y, sampler, inputBuffers); + this->m_inputValueProgram->read(inputValue, x, y, sampler, inputBuffers); + this->m_inputColorProgram->read(inputColor, x, y, sampler, inputBuffers); const float value = inputValue[0]; const float invertedValue = 1.0f - value; - if (color) { + if (this->m_color) { out[0] = (1.0f - inputColor[0]) * value + inputColor[0] * invertedValue; out[1] = (1.0f - inputColor[1]) * value + inputColor[1] * invertedValue; out[2] = (1.0f - inputColor[2]) * value + inputColor[2] * invertedValue; @@ -58,7 +58,7 @@ void InvertOperation::executePixel(float *out, float x, float y, PixelSampler sa copy_v3_v3(out, inputColor); } - if (alpha) + if (this->m_alpha) out[3] = (1.0f - inputColor[3]) * value + inputColor[3] * invertedValue; else out[3] = inputColor[3]; @@ -67,7 +67,7 @@ void InvertOperation::executePixel(float *out, float x, float y, PixelSampler sa void InvertOperation::deinitExecution() { - this->inputValueProgram = NULL; - this->inputColorProgram = NULL; + this->m_inputValueProgram = NULL; + this->m_inputColorProgram = NULL; } |