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_SetAlphaOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
index 441e0835c95..68c165411b2 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
@@ -20,32 +20,35 @@
SetAlphaOperation::SetAlphaOperation() : NodeOperation()
{
- this->addInputSocket(COM_DT_COLOR);
- this->addInputSocket(COM_DT_VALUE);
- this->addOutputSocket(COM_DT_COLOR);
+ this->addInputSocket(COM_DT_COLOR);
+ this->addInputSocket(COM_DT_VALUE);
+ this->addOutputSocket(COM_DT_COLOR);
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = NULL;
+ this->m_inputAlpha = NULL;
}
void SetAlphaOperation::initExecution()
{
- this->m_inputColor = getInputSocketReader(0);
- this->m_inputAlpha = getInputSocketReader(1);
+ this->m_inputColor = getInputSocketReader(0);
+ this->m_inputAlpha = getInputSocketReader(1);
}
-void SetAlphaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
+void SetAlphaOperation::executePixelSampled(float output[4],
+ float x,
+ float y,
+ PixelSampler sampler)
{
- float alphaInput[4];
+ float alphaInput[4];
- this->m_inputColor->readSampled(output, x, y, sampler);
- this->m_inputAlpha->readSampled(alphaInput, x, y, sampler);
+ this->m_inputColor->readSampled(output, x, y, sampler);
+ this->m_inputAlpha->readSampled(alphaInput, x, y, sampler);
- output[3] = alphaInput[0];
+ output[3] = alphaInput[0];
}
void SetAlphaOperation::deinitExecution()
{
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = NULL;
+ this->m_inputAlpha = NULL;
}