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_SeparateChannelOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_SeparateChannelOperation.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp b/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
index 4e0ad1580cd..680e1648ebd 100644
--- a/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
+++ b/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
@@ -22,21 +22,25 @@
#include "COM_SeparateChannelOperation.h"
-SeparateChannelOperation::SeparateChannelOperation() : NodeOperation() {
+SeparateChannelOperation::SeparateChannelOperation() : NodeOperation()
+{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_VALUE);
this->inputOperation = NULL;
}
-void SeparateChannelOperation::initExecution() {
+void SeparateChannelOperation::initExecution()
+{
this->inputOperation = this->getInputSocketReader(0);
}
-void SeparateChannelOperation::deinitExecution() {
+void SeparateChannelOperation::deinitExecution()
+{
this->inputOperation = NULL;
}
-void SeparateChannelOperation::executePixel(float *color,float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {
+void SeparateChannelOperation::executePixel(float *color,float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
+{
float input[4];
this->inputOperation->read(input, x, y, sampler, inputBuffers);
color[0] = input[this->channel];