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_ConvertKeyToPremulOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
index 509093f4d5f..547915f58c9 100644
--- a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
@@ -22,18 +22,21 @@
#include "COM_ConvertKeyToPremulOperation.h"
#include "BLI_math.h"
-ConvertKeyToPremulOperation::ConvertKeyToPremulOperation(): NodeOperation() {
+ConvertKeyToPremulOperation::ConvertKeyToPremulOperation(): NodeOperation()
+{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
this->inputColor = NULL;
}
-void ConvertKeyToPremulOperation::initExecution() {
+void ConvertKeyToPremulOperation::initExecution()
+{
this->inputColor = getInputSocketReader(0);
}
-void ConvertKeyToPremulOperation::executePixel(float* outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {
+void ConvertKeyToPremulOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
+{
float inputValue[4];
float alpha;
@@ -48,6 +51,7 @@ void ConvertKeyToPremulOperation::executePixel(float* outputValue, float x, floa
outputValue[3] = alpha;
}
-void ConvertKeyToPremulOperation::deinitExecution() {
+void ConvertKeyToPremulOperation::deinitExecution()
+{
this->inputColor = NULL;
}