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/operations/COM_CropOperation.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/operations/COM_CropOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_CropOperation.cc | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/compositor/operations/COM_CropOperation.cc b/source/blender/compositor/operations/COM_CropOperation.cc index d8a402cc582..5d78ed9d41a 100644 --- a/source/blender/compositor/operations/COM_CropOperation.cc +++ b/source/blender/compositor/operations/COM_CropOperation.cc @@ -22,17 +22,17 @@ namespace blender::compositor { CropBaseOperation::CropBaseOperation() { - this->addInputSocket(DataType::Color, ResizeMode::Align); - this->addOutputSocket(DataType::Color); - inputOperation_ = nullptr; + this->add_input_socket(DataType::Color, ResizeMode::Align); + this->add_output_socket(DataType::Color); + input_operation_ = nullptr; settings_ = nullptr; } -void CropBaseOperation::updateArea() +void CropBaseOperation::update_area() { - SocketReader *inputReference = this->getInputSocketReader(0); - float width = inputReference->getWidth(); - float height = inputReference->getHeight(); + SocketReader *input_reference = this->get_input_socket_reader(0); + float width = input_reference->get_width(); + float height = input_reference->get_height(); NodeTwoXYs local_settings = *settings_; if (width > 0.0f && height > 0.0f) { @@ -68,15 +68,15 @@ void CropBaseOperation::updateArea() } } -void CropBaseOperation::initExecution() +void CropBaseOperation::init_execution() { - inputOperation_ = this->getInputSocketReader(0); - updateArea(); + input_operation_ = this->get_input_socket_reader(0); + update_area(); } -void CropBaseOperation::deinitExecution() +void CropBaseOperation::deinit_execution() { - inputOperation_ = nullptr; + input_operation_ = nullptr; } CropOperation::CropOperation() : CropBaseOperation() @@ -84,10 +84,10 @@ CropOperation::CropOperation() : CropBaseOperation() /* pass */ } -void CropOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void CropOperation::execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) { if ((x < xmax_ && x >= xmin_) && (y < ymax_ && y >= ymin_)) { - inputOperation_->readSampled(output, x, y, sampler); + input_operation_->read_sampled(output, x, y, sampler); } else { zero_v4(output); @@ -115,18 +115,18 @@ CropImageOperation::CropImageOperation() : CropBaseOperation() /* pass */ } -bool CropImageOperation::determineDependingAreaOfInterest(rcti *input, - ReadBufferOperation *readOperation, - rcti *output) +bool CropImageOperation::determine_depending_area_of_interest(rcti *input, + ReadBufferOperation *read_operation, + rcti *output) { - rcti newInput; + rcti new_input; - newInput.xmax = input->xmax + xmin_; - newInput.xmin = input->xmin + xmin_; - newInput.ymax = input->ymax + ymin_; - newInput.ymin = input->ymin + ymin_; + new_input.xmax = input->xmax + xmin_; + new_input.xmin = input->xmin + xmin_; + new_input.ymax = input->ymax + ymin_; + new_input.ymin = input->ymin + ymin_; - return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output); + return NodeOperation::determine_depending_area_of_interest(&new_input, read_operation, output); } void CropImageOperation::get_area_of_interest(const int input_idx, @@ -144,18 +144,18 @@ void CropImageOperation::get_area_of_interest(const int input_idx, void CropImageOperation::determine_canvas(const rcti &preferred_area, rcti &r_area) { NodeOperation::determine_canvas(preferred_area, r_area); - updateArea(); + update_area(); r_area.xmax = r_area.xmin + (xmax_ - xmin_); r_area.ymax = r_area.ymin + (ymax_ - ymin_); } -void CropImageOperation::executePixelSampled(float output[4], - float x, - float y, - PixelSampler sampler) +void CropImageOperation::execute_pixel_sampled(float output[4], + float x, + float y, + PixelSampler sampler) { - if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) { - inputOperation_->readSampled(output, (x + xmin_), (y + ymin_), sampler); + if (x >= 0 && x < get_width() && y >= 0 && y < get_height()) { + input_operation_->read_sampled(output, (x + xmin_), (y + ymin_), sampler); } else { zero_v4(output); @@ -167,7 +167,7 @@ void CropImageOperation::update_memory_buffer_partial(MemoryBuffer *output, Span<MemoryBuffer *> inputs) { rcti op_area; - BLI_rcti_init(&op_area, 0, getWidth(), 0, getHeight()); + BLI_rcti_init(&op_area, 0, get_width(), 0, get_height()); const MemoryBuffer *input = inputs[0]; for (BuffersIterator<float> it = output->iterate_with({}, area); !it.is_end(); ++it) { if (BLI_rcti_isect_pt(&op_area, it.x, it.y)) { |