From e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Apr 2019 06:17:24 +0200 Subject: ClangFormat: apply to source, most of intern Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat --- .../compositor/nodes/COM_ColorBalanceNode.cpp | 69 +++++++++++----------- 1 file changed, 35 insertions(+), 34 deletions(-) (limited to 'source/blender/compositor/nodes/COM_ColorBalanceNode.cpp') diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp index 4fab93c07a1..64503ca306b 100644 --- a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp @@ -25,48 +25,49 @@ ColorBalanceNode::ColorBalanceNode(bNode *editorNode) : Node(editorNode) { - /* pass */ + /* pass */ } -void ColorBalanceNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const +void ColorBalanceNode::convertToOperations(NodeConverter &converter, + const CompositorContext & /*context*/) const { - bNode *node = this->getbNode(); - NodeColorBalance *n = (NodeColorBalance *)node->storage; + bNode *node = this->getbNode(); + NodeColorBalance *n = (NodeColorBalance *)node->storage; - NodeInput *inputSocket = this->getInputSocket(0); - NodeInput *inputImageSocket = this->getInputSocket(1); - NodeOutput *outputSocket = this->getOutputSocket(0); + NodeInput *inputSocket = this->getInputSocket(0); + NodeInput *inputImageSocket = this->getInputSocket(1); + NodeOutput *outputSocket = this->getOutputSocket(0); - NodeOperation *operation; - if (node->custom1 == 0) { - ColorBalanceLGGOperation *operationLGG = new ColorBalanceLGGOperation(); + NodeOperation *operation; + if (node->custom1 == 0) { + ColorBalanceLGGOperation *operationLGG = new ColorBalanceLGGOperation(); - float lift_lgg[3], gamma_inv[3]; - for (int c = 0; c < 3; c++) { - lift_lgg[c] = 2.0f - n->lift[c]; - gamma_inv[c] = (n->gamma[c] != 0.0f) ? 1.0f / n->gamma[c] : 1000000.0f; - } + float lift_lgg[3], gamma_inv[3]; + for (int c = 0; c < 3; c++) { + lift_lgg[c] = 2.0f - n->lift[c]; + gamma_inv[c] = (n->gamma[c] != 0.0f) ? 1.0f / n->gamma[c] : 1000000.0f; + } - operationLGG->setGain(n->gain); - operationLGG->setLift(lift_lgg); - operationLGG->setGammaInv(gamma_inv); - operation = operationLGG; - } - else { - ColorBalanceASCCDLOperation *operationCDL = new ColorBalanceASCCDLOperation(); + operationLGG->setGain(n->gain); + operationLGG->setLift(lift_lgg); + operationLGG->setGammaInv(gamma_inv); + operation = operationLGG; + } + else { + ColorBalanceASCCDLOperation *operationCDL = new ColorBalanceASCCDLOperation(); - float offset[3]; - copy_v3_fl(offset, n->offset_basis); - add_v3_v3(offset, n->offset); + float offset[3]; + copy_v3_fl(offset, n->offset_basis); + add_v3_v3(offset, n->offset); - operationCDL->setOffset(offset); - operationCDL->setPower(n->power); - operationCDL->setSlope(n->slope); - operation = operationCDL; - } - converter.addOperation(operation); + operationCDL->setOffset(offset); + operationCDL->setPower(n->power); + operationCDL->setSlope(n->slope); + operation = operationCDL; + } + converter.addOperation(operation); - converter.mapInputSocket(inputSocket, operation->getInputSocket(0)); - converter.mapInputSocket(inputImageSocket, operation->getInputSocket(1)); - converter.mapOutputSocket(outputSocket, operation->getOutputSocket(0)); + converter.mapInputSocket(inputSocket, operation->getInputSocket(0)); + converter.mapInputSocket(inputImageSocket, operation->getInputSocket(1)); + converter.mapOutputSocket(outputSocket, operation->getOutputSocket(0)); } -- cgit v1.2.3