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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-26 17:29:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-26 17:29:38 +0400
commit733edf86284d83dd0a70da59228b0c0d39c8cbfa (patch)
treed4f6bba86fc3d9d03f26edc08627d5c844f96ab3 /source/blender/compositor/nodes/COM_MaskNode.cpp
parent2b8fdedaf3e67115aef18bce9be3c2a35399e0f7 (diff)
option to use manual size input for scene
Diffstat (limited to 'source/blender/compositor/nodes/COM_MaskNode.cpp')
-rw-r--r--source/blender/compositor/nodes/COM_MaskNode.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/compositor/nodes/COM_MaskNode.cpp b/source/blender/compositor/nodes/COM_MaskNode.cpp
index b6300300f6f..2620f84cfae 100644
--- a/source/blender/compositor/nodes/COM_MaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_MaskNode.cpp
@@ -46,8 +46,19 @@ void MaskNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co
// always connect the output image
MaskOperation *operation = new MaskOperation();
operation->setbNode(editorNode);
- operation->setMaskWidth(data->xsch * data->size / 100.0f);
- operation->setMaskHeight(data->ysch * data->size / 100.0f);
+
+ if (editorNode->custom1 & CMP_NODEFLAG_MASK_FIXED) {
+ operation->setMaskWidth(editorNode->custom3);
+ operation->setMaskHeight(editorNode->custom4);
+ }
+ else if (editorNode->custom1 & CMP_NODEFLAG_MASK_FIXED_SCENE) {
+ operation->setMaskWidth(editorNode->custom3 * (data->size / 100.0f));
+ operation->setMaskHeight(editorNode->custom4 * (data->size / 100.0f));
+ }
+ else {
+ operation->setMaskWidth(data->xsch * data->size / 100.0f);
+ operation->setMaskHeight(data->ysch * data->size / 100.0f);
+ }
if (outputMask->isConnected()) {
outputMask->relinkConnections(operation->getOutputSocket());