diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-10 13:12:33 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-10 13:12:33 +0400 |
commit | 717ac64cb14b09660419cc4fa8b48e47ccacd854 (patch) | |
tree | 26393b4ccff0b4e9dbd580aec78a270649992da6 /source/blender/compositor/nodes/COM_MixNode.cpp | |
parent | 63ad458dbafe9cecc8568fd4779b7568d06b81b2 (diff) |
Tomato: added option to clamp result of Mix RGB and Color Math nodes
Diffstat (limited to 'source/blender/compositor/nodes/COM_MixNode.cpp')
-rw-r--r-- | source/blender/compositor/nodes/COM_MixNode.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/compositor/nodes/COM_MixNode.cpp b/source/blender/compositor/nodes/COM_MixNode.cpp index eb62ebd2635..7aeaaf56c98 100644 --- a/source/blender/compositor/nodes/COM_MixNode.cpp +++ b/source/blender/compositor/nodes/COM_MixNode.cpp @@ -58,6 +58,8 @@ void MixNode::convertToOperations(ExecutionSystem *graph, CompositorContext *con InputSocket *color2Socket = this->getInputSocket(2); OutputSocket *outputSocket = this->getOutputSocket(0); bNode *editorNode = this->getbNode(); + bool useAlphaPremultiply = this->getbNode()->custom2 & 1; + bool useClamp = this->getbNode()->custom2 & 2; MixBaseOperation *convertProg; @@ -119,7 +121,8 @@ void MixNode::convertToOperations(ExecutionSystem *graph, CompositorContext *con convertProg = new MixBlendOperation(); break; } - convertProg->setUseValueAlphaMultiply(this->getbNode()->custom2); + convertProg->setUseValueAlphaMultiply(useAlphaPremultiply); + convertProg->setUseClamp(useClamp); valueSocket->relinkConnections(convertProg->getInputSocket(0), 0, graph); color1Socket->relinkConnections(convertProg->getInputSocket(1), 1, graph); |