From 9df1e54079344ed4e2becef9e57cf1b925b46dff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 19 Jul 2018 16:06:37 +1000 Subject: Cleanup: style --- source/blender/compositor/nodes/COM_CryptomatteNode.cpp | 10 +++++----- .../blender/compositor/operations/COM_CryptomatteOperation.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/compositor') diff --git a/source/blender/compositor/nodes/COM_CryptomatteNode.cpp b/source/blender/compositor/nodes/COM_CryptomatteNode.cpp index bc115e66c20..648ea4556ad 100644 --- a/source/blender/compositor/nodes/COM_CryptomatteNode.cpp +++ b/source/blender/compositor/nodes/COM_CryptomatteNode.cpp @@ -62,7 +62,7 @@ void CryptomatteNode::convertToOperations(NodeConverter &converter, const Compos bNode *node = this->getbNode(); NodeCryptomatte *cryptoMatteSettings = (NodeCryptomatte *)node->storage; - CryptomatteOperation *operation = new CryptomatteOperation(getNumberOfInputSockets()-1); + CryptomatteOperation *operation = new CryptomatteOperation(getNumberOfInputSockets() - 1); if (cryptoMatteSettings) { if (cryptoMatteSettings->matte_id) { /* Split the string by commas, ignoring white space. */ @@ -83,7 +83,7 @@ void CryptomatteNode::convertToOperations(NodeConverter &converter, const Compos operation->addObjectIndex(atof(token.substr(1, token.length() - 2).c_str())); } else { - uint32_t hash = BLI_hash_mm3((const unsigned char*)token.c_str(), token.length(), 0); + uint32_t hash = BLI_hash_mm3((const unsigned char *)token.c_str(), token.length(), 0); operation->addObjectIndex(hash_to_float(hash)); } } @@ -93,14 +93,14 @@ void CryptomatteNode::convertToOperations(NodeConverter &converter, const Compos converter.addOperation(operation); - for (int i = 0; i < getNumberOfInputSockets()-1; ++i) { + for (int i = 0; i < getNumberOfInputSockets() - 1; ++i) { converter.mapInputSocket(this->getInputSocket(i + 1), operation->getInputSocket(i)); } SeparateChannelOperation *separateOperation = new SeparateChannelOperation; separateOperation->setChannel(3); converter.addOperation(separateOperation); - + SetAlphaOperation *operationAlpha = new SetAlphaOperation(); converter.addOperation(operationAlpha); @@ -117,5 +117,5 @@ void CryptomatteNode::convertToOperations(NodeConverter &converter, const Compos converter.mapOutputSocket(outputSocketMatte, separateOperation->getOutputSocket(0)); converter.mapOutputSocket(outputSocketImage, operationAlpha->getOutputSocket(0)); converter.mapOutputSocket(outputSocketPick, clearAlphaOperation->getOutputSocket(0)); - + } diff --git a/source/blender/compositor/operations/COM_CryptomatteOperation.cpp b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp index 9dd36863d37..f3fa81075c6 100644 --- a/source/blender/compositor/operations/COM_CryptomatteOperation.cpp +++ b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp @@ -63,7 +63,7 @@ void CryptomatteOperation::executePixel(float output[4], output[1] = ((float) ((m3hash << 8)) / (float) UINT32_MAX); output[2] = ((float) ((m3hash << 16)) / (float) UINT32_MAX); } - for(size_t i = 0; i < m_objectIndex.size(); i++) { + for (size_t i = 0; i < m_objectIndex.size(); i++) { if (m_objectIndex[i] == input[0]) { output[3] += input[1]; } -- cgit v1.2.3