diff options
author | Omar Emara <mail@OmarEmara.dev> | 2022-08-23 10:24:25 +0300 |
---|---|---|
committer | Omar Emara <mail@OmarEmara.dev> | 2022-08-23 10:24:25 +0300 |
commit | 655e9eabc3fe7d6ce868325999847823c86303ca (patch) | |
tree | 7e1438fa57ea1ada7770bdd94f1412265a6d8a45 /source/blender/compositor/nodes | |
parent | 78061e6c3e74e932218fec0bad2911cc550ad41c (diff) |
Cleanup: Turn filter node methods into an Enum
This patch turns the filter node methods into an enum and renames the
members from FILT into FILTER for easier writing.
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r-- | source/blender/compositor/nodes/COM_FilterNode.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/compositor/nodes/COM_FilterNode.cc b/source/blender/compositor/nodes/COM_FilterNode.cc index f2efa8caefd..dce08b4cf2c 100644 --- a/source/blender/compositor/nodes/COM_FilterNode.cc +++ b/source/blender/compositor/nodes/COM_FilterNode.cc @@ -21,7 +21,7 @@ void FilterNode::convert_to_operations(NodeConverter &converter, ConvolutionFilterOperation *operation = nullptr; switch (this->get_bnode()->custom1) { - case CMP_FILT_SOFT: + case CMP_NODE_FILTER_SOFT: operation = new ConvolutionFilterOperation(); operation->set3x3Filter(1 / 16.0f, 2 / 16.0f, @@ -33,11 +33,11 @@ void FilterNode::convert_to_operations(NodeConverter &converter, 2 / 16.0f, 1 / 16.0f); break; - case CMP_FILT_SHARP_BOX: + case CMP_NODE_FILTER_SHARP_BOX: operation = new ConvolutionFilterOperation(); operation->set3x3Filter(-1, -1, -1, -1, 9, -1, -1, -1, -1); break; - case CMP_FILT_LAPLACE: + case CMP_NODE_FILTER_LAPLACE: operation = new ConvolutionEdgeFilterOperation(); operation->set3x3Filter(-1 / 8.0f, -1 / 8.0f, @@ -49,23 +49,23 @@ void FilterNode::convert_to_operations(NodeConverter &converter, -1 / 8.0f, -1 / 8.0f); break; - case CMP_FILT_SOBEL: + case CMP_NODE_FILTER_SOBEL: operation = new ConvolutionEdgeFilterOperation(); operation->set3x3Filter(1, 2, 1, 0, 0, 0, -1, -2, -1); break; - case CMP_FILT_PREWITT: + case CMP_NODE_FILTER_PREWITT: operation = new ConvolutionEdgeFilterOperation(); operation->set3x3Filter(1, 1, 1, 0, 0, 0, -1, -1, -1); break; - case CMP_FILT_KIRSCH: + case CMP_NODE_FILTER_KIRSCH: operation = new ConvolutionEdgeFilterOperation(); operation->set3x3Filter(5, 5, 5, -3, -3, -3, -2, -2, -2); break; - case CMP_FILT_SHADOW: + case CMP_NODE_FILTER_SHADOW: operation = new ConvolutionFilterOperation(); operation->set3x3Filter(1, 2, 1, 0, 1, 0, -1, -2, -1); break; - case CMP_FILT_SHARP_DIAMOND: + case CMP_NODE_FILTER_SHARP_DIAMOND: operation = new ConvolutionFilterOperation(); operation->set3x3Filter(0, -1, 0, -1, 5, -1, 0, -1, 0); break; |