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_KeyingClipOperation.cpp | |
parent | 64b4b719ebd5201d27aa25d7fa2d765eabded9b0 (diff) |
Cleanup: style, use braces for compositor
Diffstat (limited to 'source/blender/compositor/operations/COM_KeyingClipOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_KeyingClipOperation.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp index 89fa8a8d303..b11bd54a190 100644 --- a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp @@ -90,21 +90,26 @@ void KeyingClipOperation::executePixel(float output[4], int x, int y, void *data } if (this->m_isEdgeMatte) { - if (ok) + if (ok) { output[0] = 0.0f; - else + } + else { output[0] = 1.0f; + } } else { output[0] = value; if (ok) { - if (output[0] < this->m_clipBlack) + if (output[0] < this->m_clipBlack) { output[0] = 0.0f; - else if (output[0] >= this->m_clipWhite) + } + else if (output[0] >= this->m_clipWhite) { output[0] = 1.0f; - else + } + else { output[0] = (output[0] - this->m_clipBlack) / (this->m_clipWhite - this->m_clipBlack); + } } } } |