diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-23 04:21:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-23 04:22:25 +0300 |
commit | 3302fbaeb1d5f58d926c06b6153ec5d6f1a9b0be (patch) | |
tree | 5be399e227415fef745bcdb2b7f20a578628718b /source/blender/compositor/operations/COM_RenderLayersProg.cpp | |
parent | 64b4b719ebd5201d27aa25d7fa2d765eabded9b0 (diff) |
Cleanup: style, use braces for compositor
Diffstat (limited to 'source/blender/compositor/operations/COM_RenderLayersProg.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_RenderLayersProg.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index e7f33cd2c79..3c0b01874aa 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp @@ -47,8 +47,9 @@ void RenderLayersProg::initExecution() Render *re = (scene) ? RE_GetSceneRender(scene) : NULL; RenderResult *rr = NULL; - if (re) + if (re) { rr = RE_AcquireResultRead(re); + } if (rr) { ViewLayer *view_layer = (ViewLayer *)BLI_findlink(&scene->view_layers, getLayerId()); @@ -74,12 +75,15 @@ void RenderLayersProg::doInterpolation(float output[4], float x, float y, PixelS int ix = x, iy = y; if (ix < 0 || iy < 0 || ix >= width || iy >= height) { - if (this->m_elementsize == 1) + if (this->m_elementsize == 1) { output[0] = 0.0f; - else if (this->m_elementsize == 3) + } + else if (this->m_elementsize == 3) { zero_v3(output); - else + } + else { zero_v4(output); + } return; } @@ -87,12 +91,15 @@ void RenderLayersProg::doInterpolation(float output[4], float x, float y, PixelS case COM_PS_NEAREST: { offset = (iy * width + ix) * this->m_elementsize; - if (this->m_elementsize == 1) + if (this->m_elementsize == 1) { output[0] = this->m_inputBuffer[offset]; - else if (this->m_elementsize == 3) + } + else if (this->m_elementsize == 3) { copy_v3_v3(output, &this->m_inputBuffer[offset]); - else + } + else { copy_v4_v4(output, &this->m_inputBuffer[offset]); + } break; } @@ -185,8 +192,9 @@ void RenderLayersProg::determineResolution(unsigned int resolution[2], resolution[0] = 0; resolution[1] = 0; - if (re) + if (re) { rr = RE_AcquireResultRead(re); + } if (rr) { ViewLayer *view_layer = (ViewLayer *)BLI_findlink(&sce->view_layers, getLayerId()); @@ -199,8 +207,9 @@ void RenderLayersProg::determineResolution(unsigned int resolution[2], } } - if (re) + if (re) { RE_ReleaseResult(re); + } } /* ******** Render Layers AO Operation ******** */ |