diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 16:29:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 16:29:48 +0400 |
commit | 86f9f3e439b10007a844aba931276a870355f909 (patch) | |
tree | 6208ced17301a0b55ec67e824a123f21d5df0a53 /source/blender/compositor | |
parent | 78b2f5df4743b52319e211e77d6ce1b0cd049afa (diff) | |
parent | 54156e2b824c9e5a4293060b194630630d1f9dc7 (diff) |
svn merge ^/trunk/blender -r48153:48158
Diffstat (limited to 'source/blender/compositor')
-rw-r--r-- | source/blender/compositor/nodes/COM_MaskNode.cpp | 3 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_MaskOperation.cpp | 4 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_MaskOperation.h | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/compositor/nodes/COM_MaskNode.cpp b/source/blender/compositor/nodes/COM_MaskNode.cpp index ed07e41a649..15917d4920b 100644 --- a/source/blender/compositor/nodes/COM_MaskNode.cpp +++ b/source/blender/compositor/nodes/COM_MaskNode.cpp @@ -55,7 +55,8 @@ void MaskNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co operation->setMask(mask); operation->setFramenumber(context->getFramenumber()); - operation->setSmooth((bool)editorNode->custom1); + operation->setSmooth((bool)(editorNode->custom1 & CMP_NODEFLAG_MASK_AA) != 0); + operation->setFeather((bool)(editorNode->custom1 & CMP_NODE_MASK_FEATHER) != 0); graph->addOperation(operation); } diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp index 0493bdee12c..3b7e98433e4 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.cpp +++ b/source/blender/compositor/operations/COM_MaskOperation.cpp @@ -75,8 +75,8 @@ void *MaskOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers float *buffer; buffer = (float *)MEM_callocN(sizeof(float) * width * height, "rasterized mask"); - BKE_mask_rasterize(mask, width, height, buffer, TRUE, this->smooth); - if (this->smooth) { + BKE_mask_rasterize(mask, width, height, buffer, TRUE, this->do_smooth, this->do_feather); + if (this->do_smooth) { PLX_antialias_buffer(buffer, width, height); } diff --git a/source/blender/compositor/operations/COM_MaskOperation.h b/source/blender/compositor/operations/COM_MaskOperation.h index 8507cb994c0..6b6d9aa9eeb 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.h +++ b/source/blender/compositor/operations/COM_MaskOperation.h @@ -40,7 +40,8 @@ protected: int maskWidth; int maskHeight; int framenumber; - bool smooth; + bool do_smooth; + bool do_feather; float *rasterizedMask; /** @@ -60,7 +61,8 @@ public: void setMaskWidth(int width) { this->maskWidth = width; } void setMaskHeight(int height) { this->maskHeight = height; } void setFramenumber(int framenumber) { this->framenumber = framenumber; } - void setSmooth(bool smooth) { this->smooth = smooth; } + void setSmooth(bool smooth) { this->do_smooth = smooth; } + void setFeather(bool feather) { this->do_feather = feather; } void executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data); }; |