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/nodes/COM_SetAlphaNode.cpp')
-rw-r--r--source/blender/compositor/nodes/COM_SetAlphaNode.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/compositor/nodes/COM_SetAlphaNode.cpp b/source/blender/compositor/nodes/COM_SetAlphaNode.cpp
index 7b722fe4440..233a5e96ff4 100644
--- a/source/blender/compositor/nodes/COM_SetAlphaNode.cpp
+++ b/source/blender/compositor/nodes/COM_SetAlphaNode.cpp
@@ -18,12 +18,23 @@
#include "COM_SetAlphaNode.h"
#include "COM_ExecutionSystem.h"
-#include "COM_SetAlphaOperation.h"
+#include "COM_SetAlphaMultiplyOperation.h"
+#include "COM_SetAlphaReplaceOperation.h"
void SetAlphaNode::convertToOperations(NodeConverter &converter,
const CompositorContext & /*context*/) const
{
- SetAlphaOperation *operation = new SetAlphaOperation();
+ const bNode *editorNode = this->getbNode();
+ const NodeSetAlpha *storage = static_cast<const NodeSetAlpha *>(editorNode->storage);
+ NodeOperation *operation = nullptr;
+ switch (storage->mode) {
+ case CMP_NODE_SETALPHA_MODE_APPLY:
+ operation = new SetAlphaMultiplyOperation();
+ break;
+ case CMP_NODE_SETALPHA_MODE_REPLACE_ALPHA:
+ operation = new SetAlphaReplaceOperation();
+ break;
+ }
if (!this->getInputSocket(0)->isLinked() && this->getInputSocket(1)->isLinked()) {
operation->setResolutionInputSocketIndex(1);