diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt index 8259cb6f297..0e8ddf4068c 100644 --- a/source/blender/compositor/CMakeLists.txt +++ b/source/blender/compositor/CMakeLists.txt @@ -491,10 +491,10 @@ set(SRC operations/COM_ColorMatteOperation.h operations/COM_ChannelMatteOperation.cpp operations/COM_ChannelMatteOperation.h - operations/COM_ConvertPremulToKeyOperation.cpp - operations/COM_ConvertPremulToKeyOperation.h - operations/COM_ConvertKeyToPremulOperation.cpp - operations/COM_ConvertKeyToPremulOperation.h + operations/COM_ConvertPremulToStraightOperation.cpp + operations/COM_ConvertPremulToStraightOperation.h + operations/COM_ConvertStraightToPremulOperation.cpp + operations/COM_ConvertStraightToPremulOperation.h operations/COM_ReadBufferOperation.cpp operations/COM_ReadBufferOperation.h diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp index 254dfb7b9c7..a7149cc63b2 100644 --- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp +++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp @@ -20,8 +20,8 @@ */ #include "COM_ConvertAlphaNode.h" -#include "COM_ConvertPremulToKeyOperation.h" -#include "COM_ConvertKeyToPremulOperation.h" +#include "COM_ConvertPremulToStraightOperation.h" +#include "COM_ConvertStraightToPremulOperation.h" #include "COM_ExecutionSystem.h" void ConvertAlphaNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context) @@ -31,10 +31,10 @@ void ConvertAlphaNode::convertToOperations(ExecutionSystem *graph, CompositorCon /* value hardcoded in rna_nodetree.c */ if (node->custom1 == 1) { - operation = new ConvertPremulToKeyOperation(); + operation = new ConvertPremulToStraightOperation(); } else { - operation = new ConvertKeyToPremulOperation(); + operation = new ConvertStraightToPremulOperation(); } this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), 0, graph); diff --git a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp b/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.cpp similarity index 78% rename from source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp rename to source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.cpp index b92da4c324f..2af4b55de1a 100644 --- a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.cpp @@ -19,10 +19,10 @@ * Dalai Felinto */ -#include "COM_ConvertPremulToKeyOperation.h" +#include "COM_ConvertPremulToStraightOperation.h" #include "BLI_math.h" -ConvertPremulToKeyOperation::ConvertPremulToKeyOperation() : NodeOperation() +ConvertPremulToStraightOperation::ConvertPremulToStraightOperation() : NodeOperation() { this->addInputSocket(COM_DT_COLOR); this->addOutputSocket(COM_DT_COLOR); @@ -30,12 +30,12 @@ ConvertPremulToKeyOperation::ConvertPremulToKeyOperation() : NodeOperation() this->m_inputColor = NULL; } -void ConvertPremulToKeyOperation::initExecution() +void ConvertPremulToStraightOperation::initExecution() { this->m_inputColor = getInputSocketReader(0); } -void ConvertPremulToKeyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertPremulToStraightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; float alpha; @@ -54,7 +54,7 @@ void ConvertPremulToKeyOperation::executePixel(float output[4], float x, float y output[3] = alpha; } -void ConvertPremulToKeyOperation::deinitExecution() +void ConvertPremulToStraightOperation::deinitExecution() { this->m_inputColor = NULL; } diff --git a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h b/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.h similarity index 85% rename from source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h rename to source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.h index 04a9965858d..9d3ab156555 100644 --- a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h +++ b/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.h @@ -19,8 +19,8 @@ * Dalai Felinto */ -#ifndef _COM_ConvertPremulToKeyOperation_h -#define _COM_ConvertPremulToKeyOperation_h +#ifndef _COM_ConvertPremulToStraightOperation_h +#define _COM_ConvertPremulToStraightOperation_h #include "COM_NodeOperation.h" @@ -28,14 +28,14 @@ * this program converts an input color to an output value. * it assumes we are in sRGB color space. */ -class ConvertPremulToKeyOperation : public NodeOperation { +class ConvertPremulToStraightOperation : public NodeOperation { private: SocketReader *m_inputColor; public: /** * Default constructor */ - ConvertPremulToKeyOperation(); + ConvertPremulToStraightOperation(); /** * the inner loop of this program diff --git a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp b/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.cpp similarity index 77% rename from source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp rename to source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.cpp index 4497db52a0f..ae55d949ff2 100644 --- a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.cpp @@ -19,10 +19,10 @@ * Dalai Felinto */ -#include "COM_ConvertKeyToPremulOperation.h" +#include "COM_ConvertStraightToPremulOperation.h" #include "BLI_math.h" -ConvertKeyToPremulOperation::ConvertKeyToPremulOperation() : NodeOperation() +ConvertStraightToPremulOperation::ConvertStraightToPremulOperation() : NodeOperation() { this->addInputSocket(COM_DT_COLOR); this->addOutputSocket(COM_DT_COLOR); @@ -30,12 +30,12 @@ ConvertKeyToPremulOperation::ConvertKeyToPremulOperation() : NodeOperation() this->m_inputColor = NULL; } -void ConvertKeyToPremulOperation::initExecution() +void ConvertStraightToPremulOperation::initExecution() { this->m_inputColor = getInputSocketReader(0); } -void ConvertKeyToPremulOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertStraightToPremulOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; float alpha; @@ -49,7 +49,7 @@ void ConvertKeyToPremulOperation::executePixel(float output[4], float x, float y output[3] = alpha; } -void ConvertKeyToPremulOperation::deinitExecution() +void ConvertStraightToPremulOperation::deinitExecution() { this->m_inputColor = NULL; } diff --git a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h b/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.h similarity index 86% rename from source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h rename to source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.h index 502674e26db..d0191f292d2 100644 --- a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h +++ b/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.h @@ -19,8 +19,8 @@ * Dalai Felinto */ -#ifndef _COM_ConvertKeyToPremulOperation_h -#define _COM_ConvertKeyToPremulOperation_h +#ifndef _COM_ConvertStraightToPremulOperation_h +#define _COM_ConvertStraightToPremulOperation_h #include "COM_NodeOperation.h" @@ -28,14 +28,14 @@ * this program converts an input color to an output value. * it assumes we are in sRGB color space. */ -class ConvertKeyToPremulOperation : public NodeOperation { +class ConvertStraightToPremulOperation : public NodeOperation { private: SocketReader *m_inputColor; public: /** * Default constructor */ - ConvertKeyToPremulOperation(); + ConvertStraightToPremulOperation(); /** * the inner loop of this program diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 05dba0c0f68..18dfd8aa6f9 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3217,8 +3217,8 @@ static void def_cmp_premul_key(StructRNA *srna) PropertyRNA *prop; static EnumPropertyItem type_items[] = { - {0, "KEY_TO_PREMUL", 0, "Key to Premul", ""}, - {1, "PREMUL_TO_KEY", 0, "Premul to Key", ""}, + {0, "STRAIGHT_TO_PREMUL", 0, "Straight to Premul", ""}, + {1, "PREMUL_TO_STRAIGHT", 0, "Premul to Straight", ""}, {0, NULL, 0, NULL, NULL} };