diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 05:22:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 05:22:05 +0400 |
commit | 6a1d82490e49d1f5d73b5082516b087d44010fb8 (patch) | |
tree | 0650cce3c1d47db6c5de1f4f2ba05b619c412f09 /source/blender/compositor/operations/COM_MultilayerImageOperation.cpp | |
parent | 7a0ab62d3f65f3b28da2a6ba9916c21132f8ea0d (diff) |
use m_ prefix for compositor class members (all compositor operations).
Diffstat (limited to 'source/blender/compositor/operations/COM_MultilayerImageOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_MultilayerImageOperation.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp index 1bd21f6e712..363c0379770 100644 --- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp +++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp @@ -29,15 +29,15 @@ extern "C" { MultilayerBaseOperation::MultilayerBaseOperation(int pass) : BaseImageOperation() { - this->passId = pass; + this->m_passId = pass; } ImBuf *MultilayerBaseOperation::getImBuf() { RenderPass *rpass; - rpass = (RenderPass *)BLI_findlink(&this->renderlayer->passes, this->passId); + rpass = (RenderPass *)BLI_findlink(&this->m_renderlayer->passes, this->m_passId); if (rpass) { - this->imageUser->pass = this->passId; - BKE_image_multilayer_index(image->rr, this->imageUser); + this->m_imageUser->pass = this->m_passId; + BKE_image_multilayer_index(this->m_image->rr, this->m_imageUser); return BaseImageOperation::getImBuf(); } return NULL; @@ -47,31 +47,29 @@ void MultilayerColorOperation::executePixel(float *color, float x, float y, Pixe { int yi = y; int xi = x; - if (this->imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) { + if (this->m_imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) { color[0] = 0.0f; color[1] = 0.0f; color[2] = 0.0f; color[3] = 0.0f; } else { - if (this->numberOfChannels == 4) { + if (this->m_numberOfChannels == 4) { switch (sampler) { case COM_PS_NEAREST: - neareast_interpolation_color(this->buffer, NULL, color, x, y); + neareast_interpolation_color(this->m_buffer, NULL, color, x, y); break; case COM_PS_BILINEAR: - bilinear_interpolation_color(this->buffer, NULL, color, x, y); + bilinear_interpolation_color(this->m_buffer, NULL, color, x, y); break; case COM_PS_BICUBIC: - bicubic_interpolation_color(this->buffer, NULL, color, x, y); + bicubic_interpolation_color(this->m_buffer, NULL, color, x, y); break; } } else { int offset = (yi * this->getWidth() + xi) * 3; - color[0] = this->imageBuffer[offset]; - color[1] = this->imageBuffer[offset + 1]; - color[2] = this->imageBuffer[offset + 2]; + copy_v3_v3(color, &this->m_imageBuffer[offset]); } } } @@ -80,11 +78,11 @@ void MultilayerValueOperation::executePixel(float *color, float x, float y, Pixe { int yi = y; int xi = x; - if (this->imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) { + if (this->m_imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) { color[0] = 0.0f; } else { - float result = this->imageBuffer[yi * this->getWidth() + xi]; + float result = this->m_imageBuffer[yi * this->getWidth() + xi]; color[0] = result; } } @@ -93,13 +91,11 @@ void MultilayerVectorOperation::executePixel(float *color, float x, float y, Pix { int yi = y; int xi = x; - if (this->imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) { + if (this->m_imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) { color[0] = 0.0f; } else { int offset = (yi * this->getWidth() + xi) * 3; - color[0] = this->imageBuffer[offset]; - color[1] = this->imageBuffer[offset + 1]; - color[2] = this->imageBuffer[offset + 2]; + copy_v3_v3(color, &this->m_imageBuffer[offset]); } } |