From 566b319335563888e252b2186c93606ad41ff216 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 18 Jul 2018 13:34:22 +0200 Subject: Cleanup: Cryptomatte node style tweaks. --- source/blender/compositor/nodes/COM_CryptomatteNode.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/compositor/nodes') diff --git a/source/blender/compositor/nodes/COM_CryptomatteNode.cpp b/source/blender/compositor/nodes/COM_CryptomatteNode.cpp index c8134068543..bc115e66c20 100644 --- a/source/blender/compositor/nodes/COM_CryptomatteNode.cpp +++ b/source/blender/compositor/nodes/COM_CryptomatteNode.cpp @@ -35,7 +35,8 @@ CryptomatteNode::CryptomatteNode(bNode *editorNode) : Node(editorNode) } /* This is taken from the Cryptomatte specification 1.0. */ -static inline float hash_to_float(uint32_t hash) { +static inline float hash_to_float(uint32_t hash) +{ uint32_t mantissa = hash & (( 1 << 23) - 1); uint32_t exponent = (hash >> 23) & ((1 << 8) - 1); exponent = max(exponent, (uint32_t) 1); @@ -95,7 +96,7 @@ void CryptomatteNode::convertToOperations(NodeConverter &converter, const Compos 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); -- cgit v1.2.3