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_SunBeamsOperation.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_SunBeamsOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_SunBeamsOperation.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/compositor/operations/COM_SunBeamsOperation.cc b/source/blender/compositor/operations/COM_SunBeamsOperation.cc index b055d0a7644..5842fcc2278 100644 --- a/source/blender/compositor/operations/COM_SunBeamsOperation.cc +++ b/source/blender/compositor/operations/COM_SunBeamsOperation.cc @@ -23,8 +23,8 @@ namespace blender::compositor { SunBeamsOperation::SunBeamsOperation() { - this->addInputSocket(DataType::Color); - this->addOutputSocket(DataType::Color); + this->add_input_socket(DataType::Color); + this->add_output_socket(DataType::Color); this->set_canvas_input_index(0); this->flags.complex = true; @@ -33,12 +33,12 @@ SunBeamsOperation::SunBeamsOperation() void SunBeamsOperation::calc_rays_common_data() { /* convert to pixels */ - source_px_[0] = data_.source[0] * this->getWidth(); - source_px_[1] = data_.source[1] * this->getHeight(); - ray_length_px_ = data_.ray_length * MAX2(this->getWidth(), this->getHeight()); + source_px_[0] = data_.source[0] * this->get_width(); + source_px_[1] = data_.source[1] * this->get_height(); + ray_length_px_ = data_.ray_length * MAX2(this->get_width(), this->get_height()); } -void SunBeamsOperation::initExecution() +void SunBeamsOperation::init_execution() { calc_rays_common_data(); } @@ -145,7 +145,7 @@ template<int fxu, int fxv, int fyu, int fyv> struct BufferLineAccumulator { falloff_factor = dist_max > dist_min ? dr / (float)(dist_max - dist_min) : 0.0f; - float *iter = input->getBuffer() + input->get_coords_offset(x, y); + float *iter = input->get_buffer() + input->get_coords_offset(x, y); return iter; } @@ -312,13 +312,13 @@ static void accumulate_line(MemoryBuffer *input, } } -void *SunBeamsOperation::initializeTileData(rcti * /*rect*/) +void *SunBeamsOperation::initialize_tile_data(rcti * /*rect*/) { - void *buffer = getInputOperation(0)->initializeTileData(nullptr); + void *buffer = get_input_operation(0)->initialize_tile_data(nullptr); return buffer; } -void SunBeamsOperation::executePixel(float output[4], int x, int y, void *data) +void SunBeamsOperation::execute_pixel(float output[4], int x, int y, void *data) { const float co[2] = {(float)x, (float)y}; @@ -340,9 +340,9 @@ static void calc_ray_shift(rcti *rect, float x, float y, const float source[2], BLI_rcti_do_minmax_v(rect, ico); } -bool SunBeamsOperation::determineDependingAreaOfInterest(rcti *input, - ReadBufferOperation *readOperation, - rcti *output) +bool SunBeamsOperation::determine_depending_area_of_interest(rcti *input, + ReadBufferOperation *read_operation, + rcti *output) { /* Enlarges the rect by moving each corner toward the source. * This is the maximum distance that pixels can influence each other @@ -354,7 +354,7 @@ bool SunBeamsOperation::determineDependingAreaOfInterest(rcti *input, calc_ray_shift(&rect, input->xmax, input->ymin, source_px_, ray_length_px_); calc_ray_shift(&rect, input->xmax, input->ymax, source_px_, ray_length_px_); - return NodeOperation::determineDependingAreaOfInterest(&rect, readOperation, output); + return NodeOperation::determine_depending_area_of_interest(&rect, read_operation, output); } void SunBeamsOperation::get_area_of_interest(const int input_idx, |