Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/operations/COM_InvertOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.cpp24
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;
}