diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 16:27:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 16:27:57 +0400 |
commit | 54156e2b824c9e5a4293060b194630630d1f9dc7 (patch) | |
tree | 30e2a96f5ab5c38b999653c50560de54fade9715 /source/blender/compositor | |
parent | ff998e15a75a1f38db1e3fc91f7f0ef6664e4e45 (diff) |
option to disable feather, since its so slow - for interactively editing masks its useful to be able to disable.
also rename RNA to 'use_antialiasing'
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..d0b6120198f 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_NODEFLAG_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); }; |