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_MaskNode.cpp')
-rw-r--r--source/blender/compositor/nodes/COM_MaskNode.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/source/blender/compositor/nodes/COM_MaskNode.cpp b/source/blender/compositor/nodes/COM_MaskNode.cpp
index 991c3f75e05..ed07e41a649 100644
--- a/source/blender/compositor/nodes/COM_MaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_MaskNode.cpp
@@ -29,15 +29,15 @@ extern "C" {
#include "DNA_mask_types.h"
}
-MaskNode::MaskNode(bNode *editorNode): Node(editorNode)
+MaskNode::MaskNode(bNode *editorNode) : Node(editorNode)
{
+ /* pass */
}
-void MaskNode::convertToOperations(ExecutionSystem *graph, CompositorContext * context)
+void MaskNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
{
const RenderData *data = &context->getScene()->r;
- InputSocket *inputImage = this->getInputSocket(0);
OutputSocket *outputMask = this->getOutputSocket(0);
bNode *editorNode = this->getbNode();
@@ -46,13 +46,8 @@ void MaskNode::convertToOperations(ExecutionSystem *graph, CompositorContext * c
// always connect the output image
MaskOperation *operation = new MaskOperation();
- if (inputImage->isConnected()) {
- inputImage->relinkConnections(operation->getInputSocket(0), 0, graph);
- }
- else {
- operation->setMaskWidth(data->xsch * data->size / 100.0f);
- operation->setMaskHeight(data->ysch * data->size / 100.0f);
- }
+ operation->setMaskWidth(data->xsch * data->size / 100.0f);
+ operation->setMaskHeight(data->ysch * data->size / 100.0f);
if (outputMask->isConnected()) {
outputMask->relinkConnections(operation->getOutputSocket());
@@ -60,6 +55,7 @@ void MaskNode::convertToOperations(ExecutionSystem *graph, CompositorContext * c
operation->setMask(mask);
operation->setFramenumber(context->getFramenumber());
+ operation->setSmooth((bool)editorNode->custom1);
graph->addOperation(operation);
}