diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-15 21:57:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-15 21:57:39 +0400 |
commit | cde4d7284891b07f4a221868f15b4b90a6b42585 (patch) | |
tree | f1f6b37b096a7f5716c9b017245aa45dbccd7dcf /source/blender/compositor/nodes/COM_GlareNode.cpp | |
parent | 687b6e5447855311522cc42ed980c9df3400b1c4 (diff) |
style cleanup: more nodes
Diffstat (limited to 'source/blender/compositor/nodes/COM_GlareNode.cpp')
-rw-r--r-- | source/blender/compositor/nodes/COM_GlareNode.cpp | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp index dcb8f3a3a4c..7b34fa4d286 100644 --- a/source/blender/compositor/nodes/COM_GlareNode.cpp +++ b/source/blender/compositor/nodes/COM_GlareNode.cpp @@ -31,36 +31,37 @@ #include "COM_GlareGhostOperation.h" #include "COM_GlareFogGlowOperation.h" -GlareNode::GlareNode(bNode *editorNode): Node(editorNode) +GlareNode::GlareNode(bNode *editorNode) : Node(editorNode) { + /* pass */ } -void GlareNode::convertToOperations(ExecutionSystem *system, CompositorContext * context)\ -{ +void GlareNode::convertToOperations(ExecutionSystem *system, CompositorContext *context) \ + { bNode *node = this->getbNode(); - NodeGlare *glare = (NodeGlare*)node->storage; + NodeGlare *glare = (NodeGlare *)node->storage; - GlareBaseOperation * glareoperation = NULL; + GlareBaseOperation *glareoperation = NULL; switch (glare->type) { - default: - case 3: - glareoperation = new GlareGhostOperation(); - break; - case 2: // streaks - glareoperation = new GlareStreaksOperation(); - break; - case 1: // fog glow - glareoperation = new GlareFogGlowOperation(); - break; - case 0: // simple star - glareoperation = new GlareSimpleStarOperation(); - break; + default: + case 3: + glareoperation = new GlareGhostOperation(); + break; + case 2: // streaks + glareoperation = new GlareStreaksOperation(); + break; + case 1: // fog glow + glareoperation = new GlareFogGlowOperation(); + break; + case 0: // simple star + glareoperation = new GlareSimpleStarOperation(); + break; } GlareThresholdOperation *thresholdOperation = new GlareThresholdOperation(); - SetValueOperation * mixvalueoperation = new SetValueOperation(); - MixGlareOperation * mixoperation = new MixGlareOperation(); + SetValueOperation *mixvalueoperation = new SetValueOperation(); + MixGlareOperation *mixoperation = new MixGlareOperation(); mixoperation->getInputSocket(2)->setResizeMode(COM_SC_FIT); this->getInputSocket(0)->relinkConnections(thresholdOperation->getInputSocket(0), 0, system); @@ -72,7 +73,7 @@ void GlareNode::convertToOperations(ExecutionSystem *system, CompositorContext * thresholdOperation->setGlareSettings(glare); glareoperation->setGlareSettings(glare); - mixvalueoperation->setValue(0.5f+glare->mix*0.5f); + mixvalueoperation->setValue(0.5f + glare->mix * 0.5f); mixoperation->setResolutionInputSocketIndex(1); system->addOperation(glareoperation); @@ -80,4 +81,4 @@ void GlareNode::convertToOperations(ExecutionSystem *system, CompositorContext * system->addOperation(mixvalueoperation); system->addOperation(mixoperation); -} + } |