Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2012-06-14 05:32:45 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-06-14 05:32:45 +0400
commitcc82653b728408d5e30524549a419fe20fa6a967 (patch)
tree2387c47096e61341e318911b3a401cca62696ef0 /source/blender/compositor/nodes/COM_GlareNode.cpp
parentbde7e6c96b9e180b293ee6e49ab813a30fac0635 (diff)
Matched FogGlow with old implementation
Diffstat (limited to 'source/blender/compositor/nodes/COM_GlareNode.cpp')
-rw-r--r--source/blender/compositor/nodes/COM_GlareNode.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp
index dc367040c9a..6e8e66c83ac 100644
--- a/source/blender/compositor/nodes/COM_GlareNode.cpp
+++ b/source/blender/compositor/nodes/COM_GlareNode.cpp
@@ -22,7 +22,6 @@
#include "COM_GlareNode.h"
#include "DNA_node_types.h"
-#include "COM_FogGlowImageOperation.h"
#include "COM_GlareThresholdOperation.h"
#include "COM_GlareSimpleStarOperation.h"
#include "COM_GlareStreaksOperation.h"
@@ -30,6 +29,7 @@
#include "COM_MixBlendOperation.h"
#include "COM_FastGaussianBlurOperation.h"
#include "COM_GlareGhostOperation.h"
+#include "COM_GlareFogGlowOperation.h"
GlareNode::GlareNode(bNode *editorNode): Node(editorNode)
{
@@ -95,34 +95,25 @@ void GlareNode::convertToOperations(ExecutionSystem *system, CompositorContext *
case 1: // fog glow
{
GlareThresholdOperation *thresholdOperation = new GlareThresholdOperation();
- FastGaussianBlurOperation* bluroperation = new FastGaussianBlurOperation();
- SetValueOperation * valueoperation = new SetValueOperation();
+ GlareFogGlowOperation * glareoperation = new GlareFogGlowOperation();
SetValueOperation * mixvalueoperation = new SetValueOperation();
MixBlendOperation * mixoperation = new MixBlendOperation();
- mixoperation->setResolutionInputSocketIndex(1);
+
this->getInputSocket(0)->relinkConnections(thresholdOperation->getInputSocket(0), 0, system);
- addLink(system, thresholdOperation->getOutputSocket(), bluroperation->getInputSocket(0));
- addLink(system, valueoperation->getOutputSocket(), bluroperation->getInputSocket(1));
+ addLink(system, thresholdOperation->getOutputSocket(), glareoperation->getInputSocket(0));
addLink(system, mixvalueoperation->getOutputSocket(), mixoperation->getInputSocket(0));
- addLink(system, bluroperation->getOutputSocket(), mixoperation->getInputSocket(2));
+ addLink(system, glareoperation->getOutputSocket(), mixoperation->getInputSocket(2));
addLink(system, thresholdOperation->getInputSocket(0)->getConnection()->getFromSocket(), mixoperation->getInputSocket(1));
+ this->getOutputSocket()->relinkConnections(mixoperation->getOutputSocket());
thresholdOperation->setThreshold(glare->threshold);
- NodeBlurData * data = new NodeBlurData();
- data->relative = 0;
- data->sizex = glare->size;
- data->sizey = glare->size;
- bluroperation->setData(data);
- bluroperation->deleteDataWhenFinished();
- bluroperation->setQuality(context->getQuality());
- valueoperation->setValue(1.0f);
+ glareoperation->setGlareSettings(glare);
mixvalueoperation->setValue(0.5f+glare->mix*0.5f);
- this->getOutputSocket()->relinkConnections(mixoperation->getOutputSocket());
+ mixoperation->setResolutionInputSocketIndex(1);
- system->addOperation(bluroperation);
+ system->addOperation(glareoperation);
system->addOperation(thresholdOperation);
system->addOperation(mixvalueoperation);
- system->addOperation(valueoperation);
system->addOperation(mixoperation);
}
break;