diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/compositor/nodes/COM_EllipseMaskNode.cpp | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
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
Diffstat (limited to 'source/blender/compositor/nodes/COM_EllipseMaskNode.cpp')
-rw-r--r-- | source/blender/compositor/nodes/COM_EllipseMaskNode.cpp | 67 |
1 files changed, 34 insertions, 33 deletions
diff --git a/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp b/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp index d44ac848864..349d0908a98 100644 --- a/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp +++ b/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp @@ -25,45 +25,46 @@ EllipseMaskNode::EllipseMaskNode(bNode *editorNode) : Node(editorNode) { - /* pass */ + /* pass */ } -void EllipseMaskNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void EllipseMaskNode::convertToOperations(NodeConverter &converter, + const CompositorContext &context) const { - NodeInput *inputSocket = this->getInputSocket(0); - NodeOutput *outputSocket = this->getOutputSocket(0); + NodeInput *inputSocket = this->getInputSocket(0); + NodeOutput *outputSocket = this->getOutputSocket(0); - EllipseMaskOperation *operation; - operation = new EllipseMaskOperation(); - operation->setData((NodeEllipseMask *)this->getbNode()->storage); - operation->setMaskType(this->getbNode()->custom1); - converter.addOperation(operation); + EllipseMaskOperation *operation; + operation = new EllipseMaskOperation(); + operation->setData((NodeEllipseMask *)this->getbNode()->storage); + operation->setMaskType(this->getbNode()->custom1); + converter.addOperation(operation); - if (inputSocket->isLinked()) { - converter.mapInputSocket(inputSocket, operation->getInputSocket(0)); - converter.mapOutputSocket(outputSocket, operation->getOutputSocket()); - } - else { - /* Value operation to produce original transparent image */ - SetValueOperation *valueOperation = new SetValueOperation(); - valueOperation->setValue(0.0f); - converter.addOperation(valueOperation); + if (inputSocket->isLinked()) { + converter.mapInputSocket(inputSocket, operation->getInputSocket(0)); + converter.mapOutputSocket(outputSocket, operation->getOutputSocket()); + } + else { + /* Value operation to produce original transparent image */ + SetValueOperation *valueOperation = new SetValueOperation(); + valueOperation->setValue(0.0f); + converter.addOperation(valueOperation); - /* Scale that image up to render resolution */ - const RenderData *rd = context.getRenderData(); - ScaleFixedSizeOperation *scaleOperation = new ScaleFixedSizeOperation(); - scaleOperation->setIsAspect(false); - scaleOperation->setIsCrop(false); - scaleOperation->setOffset(0.0f, 0.0f); - scaleOperation->setNewWidth(rd->xsch * rd->size / 100.0f); - scaleOperation->setNewHeight(rd->ysch * rd->size / 100.0f); - scaleOperation->getInputSocket(0)->setResizeMode(COM_SC_NO_RESIZE); - converter.addOperation(scaleOperation); + /* Scale that image up to render resolution */ + const RenderData *rd = context.getRenderData(); + ScaleFixedSizeOperation *scaleOperation = new ScaleFixedSizeOperation(); + scaleOperation->setIsAspect(false); + scaleOperation->setIsCrop(false); + scaleOperation->setOffset(0.0f, 0.0f); + scaleOperation->setNewWidth(rd->xsch * rd->size / 100.0f); + scaleOperation->setNewHeight(rd->ysch * rd->size / 100.0f); + scaleOperation->getInputSocket(0)->setResizeMode(COM_SC_NO_RESIZE); + converter.addOperation(scaleOperation); - converter.addLink(valueOperation->getOutputSocket(0), scaleOperation->getInputSocket(0)); - converter.addLink(scaleOperation->getOutputSocket(0), operation->getInputSocket(0)); - converter.mapOutputSocket(outputSocket, operation->getOutputSocket(0)); - } + converter.addLink(valueOperation->getOutputSocket(0), scaleOperation->getInputSocket(0)); + converter.addLink(scaleOperation->getOutputSocket(0), operation->getInputSocket(0)); + converter.mapOutputSocket(outputSocket, operation->getOutputSocket(0)); + } - converter.mapInputSocket(getInputSocket(1), operation->getInputSocket(1)); + converter.mapInputSocket(getInputSocket(1), operation->getInputSocket(1)); } |