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_GlareSimpleStarOperation.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_GlareSimpleStarOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc index cc24a50a307..5d8dca055aa 100644 --- a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc +++ b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc @@ -20,26 +20,26 @@ namespace blender::compositor { -void GlareSimpleStarOperation::generateGlare(float *data, - MemoryBuffer *inputTile, - NodeGlare *settings) +void GlareSimpleStarOperation::generate_glare(float *data, + MemoryBuffer *input_tile, + NodeGlare *settings) { int i, x, y, ym, yp, xm, xp; float c[4] = {0, 0, 0, 0}, tc[4] = {0, 0, 0, 0}; const float f1 = 1.0f - settings->fade; const float f2 = (1.0f - f1) * 0.5f; - MemoryBuffer tbuf1(*inputTile); - MemoryBuffer tbuf2(*inputTile); + MemoryBuffer tbuf1(*input_tile); + MemoryBuffer tbuf2(*input_tile); bool breaked = false; for (i = 0; i < settings->iter && (!breaked); i++) { // // (x || x-1, y-1) to (x || x+1, y+1) // // F - for (y = 0; y < this->getHeight() && (!breaked); y++) { + for (y = 0; y < this->get_height() && (!breaked); y++) { ym = y - i; yp = y + i; - for (x = 0; x < this->getWidth(); x++) { + for (x = 0; x < this->get_width(); x++) { xm = x - i; xp = x + i; tbuf1.read(c, x, y); @@ -49,7 +49,7 @@ void GlareSimpleStarOperation::generateGlare(float *data, tbuf1.read(tc, (settings->star_45 ? xp : x), yp); madd_v3_v3fl(c, tc, f2); c[3] = 1.0f; - tbuf1.writePixel(x, y, c); + tbuf1.write_pixel(x, y, c); tbuf2.read(c, x, y); mul_v3_fl(c, f1); @@ -58,17 +58,17 @@ void GlareSimpleStarOperation::generateGlare(float *data, tbuf2.read(tc, xp, (settings->star_45 ? ym : y)); madd_v3_v3fl(c, tc, f2); c[3] = 1.0f; - tbuf2.writePixel(x, y, c); + tbuf2.write_pixel(x, y, c); } - if (isBraked()) { + if (is_braked()) { breaked = true; } } // // B - for (y = this->getHeight() - 1; y >= 0 && (!breaked); y--) { + for (y = this->get_height() - 1; y >= 0 && (!breaked); y--) { ym = y - i; yp = y + i; - for (x = this->getWidth() - 1; x >= 0; x--) { + for (x = this->get_width() - 1; x >= 0; x--) { xm = x - i; xp = x + i; tbuf1.read(c, x, y); @@ -78,7 +78,7 @@ void GlareSimpleStarOperation::generateGlare(float *data, tbuf1.read(tc, (settings->star_45 ? xp : x), yp); madd_v3_v3fl(c, tc, f2); c[3] = 1.0f; - tbuf1.writePixel(x, y, c); + tbuf1.write_pixel(x, y, c); tbuf2.read(c, x, y); mul_v3_fl(c, f1); @@ -87,16 +87,16 @@ void GlareSimpleStarOperation::generateGlare(float *data, tbuf2.read(tc, xp, (settings->star_45 ? ym : y)); madd_v3_v3fl(c, tc, f2); c[3] = 1.0f; - tbuf2.writePixel(x, y, c); + tbuf2.write_pixel(x, y, c); } - if (isBraked()) { + if (is_braked()) { breaked = true; } } } - for (i = 0; i < this->getWidth() * this->getHeight() * 4; i++) { - data[i] = tbuf1.getBuffer()[i] + tbuf2.getBuffer()[i]; + for (i = 0; i < this->get_width() * this->get_height() * 4; i++) { + data[i] = tbuf1.get_buffer()[i] + tbuf2.get_buffer()[i]; } } |