diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-14 00:01:15 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-14 00:41:14 +0300 |
commit | 1c42d4930a24d639b3aa561b9a8b4bbce05977e0 (patch) | |
tree | 68c2aae3fd5ae98b78708bea28c0b55d3f4fb5f0 /source/blender/compositor/nodes/COM_ZCombineNode.cc | |
parent | a2ee3c3a9f01f5cb2f05f1e84a1b6c1931d9d4a4 (diff) |
Cleanup: convert camelCase naming to snake_case in Compositor
To convert old code to the current convention and
use a single code style.
Diffstat (limited to 'source/blender/compositor/nodes/COM_ZCombineNode.cc')
-rw-r--r-- | source/blender/compositor/nodes/COM_ZCombineNode.cc | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cc b/source/blender/compositor/nodes/COM_ZCombineNode.cc index 5f7fec53808..52cb1451ba1 100644 --- a/source/blender/compositor/nodes/COM_ZCombineNode.cc +++ b/source/blender/compositor/nodes/COM_ZCombineNode.cc @@ -24,31 +24,31 @@ namespace blender::compositor { -void ZCombineNode::convertToOperations(NodeConverter &converter, - const CompositorContext & /*context*/) const +void ZCombineNode::convert_to_operations(NodeConverter &converter, + const CompositorContext & /*context*/) const { - if (this->getbNode()->custom2) { + if (this->get_bnode()->custom2) { ZCombineOperation *operation = nullptr; - if (this->getbNode()->custom1) { + if (this->get_bnode()->custom1) { operation = new ZCombineAlphaOperation(); } else { operation = new ZCombineOperation(); } - converter.addOperation(operation); + converter.add_operation(operation); - converter.mapInputSocket(getInputSocket(0), operation->getInputSocket(0)); - converter.mapInputSocket(getInputSocket(1), operation->getInputSocket(1)); - converter.mapInputSocket(getInputSocket(2), operation->getInputSocket(2)); - converter.mapInputSocket(getInputSocket(3), operation->getInputSocket(3)); - converter.mapOutputSocket(getOutputSocket(0), operation->getOutputSocket()); + converter.map_input_socket(get_input_socket(0), operation->get_input_socket(0)); + converter.map_input_socket(get_input_socket(1), operation->get_input_socket(1)); + converter.map_input_socket(get_input_socket(2), operation->get_input_socket(2)); + converter.map_input_socket(get_input_socket(3), operation->get_input_socket(3)); + converter.map_output_socket(get_output_socket(0), operation->get_output_socket()); MathMinimumOperation *zoperation = new MathMinimumOperation(); - converter.addOperation(zoperation); + converter.add_operation(zoperation); - converter.mapInputSocket(getInputSocket(1), zoperation->getInputSocket(0)); - converter.mapInputSocket(getInputSocket(3), zoperation->getInputSocket(1)); - converter.mapOutputSocket(getOutputSocket(1), zoperation->getOutputSocket()); + converter.map_input_socket(get_input_socket(1), zoperation->get_input_socket(0)); + converter.map_input_socket(get_input_socket(3), zoperation->get_input_socket(1)); + converter.map_output_socket(get_output_socket(1), zoperation->get_output_socket()); } else { /* XXX custom1 is "use_alpha", what on earth is this supposed to do here?!? */ @@ -56,40 +56,42 @@ void ZCombineNode::convertToOperations(NodeConverter &converter, /* Step 1 create mask. */ NodeOperation *maskoperation; - if (this->getbNode()->custom1) { + if (this->get_bnode()->custom1) { maskoperation = new MathGreaterThanOperation(); } else { maskoperation = new MathLessThanOperation(); } - converter.addOperation(maskoperation); + converter.add_operation(maskoperation); - converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0)); - converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1)); + converter.map_input_socket(get_input_socket(1), maskoperation->get_input_socket(0)); + converter.map_input_socket(get_input_socket(3), maskoperation->get_input_socket(1)); /* Step 2 anti alias mask bit of an expensive operation, but does the trick. */ AntiAliasOperation *antialiasoperation = new AntiAliasOperation(); - converter.addOperation(antialiasoperation); + converter.add_operation(antialiasoperation); - converter.addLink(maskoperation->getOutputSocket(), antialiasoperation->getInputSocket(0)); + converter.add_link(maskoperation->get_output_socket(), + antialiasoperation->get_input_socket(0)); /* use mask to blend between the input colors. */ - ZCombineMaskOperation *zcombineoperation = this->getbNode()->custom1 ? + ZCombineMaskOperation *zcombineoperation = this->get_bnode()->custom1 ? new ZCombineMaskAlphaOperation() : new ZCombineMaskOperation(); - converter.addOperation(zcombineoperation); + converter.add_operation(zcombineoperation); - converter.addLink(antialiasoperation->getOutputSocket(), zcombineoperation->getInputSocket(0)); - converter.mapInputSocket(getInputSocket(0), zcombineoperation->getInputSocket(1)); - converter.mapInputSocket(getInputSocket(2), zcombineoperation->getInputSocket(2)); - converter.mapOutputSocket(getOutputSocket(0), zcombineoperation->getOutputSocket()); + converter.add_link(antialiasoperation->get_output_socket(), + zcombineoperation->get_input_socket(0)); + converter.map_input_socket(get_input_socket(0), zcombineoperation->get_input_socket(1)); + converter.map_input_socket(get_input_socket(2), zcombineoperation->get_input_socket(2)); + converter.map_output_socket(get_output_socket(0), zcombineoperation->get_output_socket()); MathMinimumOperation *zoperation = new MathMinimumOperation(); - converter.addOperation(zoperation); + converter.add_operation(zoperation); - converter.mapInputSocket(getInputSocket(1), zoperation->getInputSocket(0)); - converter.mapInputSocket(getInputSocket(3), zoperation->getInputSocket(1)); - converter.mapOutputSocket(getOutputSocket(1), zoperation->getOutputSocket()); + converter.map_input_socket(get_input_socket(1), zoperation->get_input_socket(0)); + converter.map_input_socket(get_input_socket(3), zoperation->get_input_socket(1)); + converter.map_output_socket(get_output_socket(1), zoperation->get_output_socket()); } } |