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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-16 17:15:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-16 17:15:13 +0400
commit6fb4bbdbd963eb0f9626d6bd784b22c65bd5cd44 (patch)
tree385bef546c79e6867fb624f0679eba96b0b2ca47 /source/blender/compositor
parentefa09a2b3d924e901cbcbf5a0eb274d44422cc45 (diff)
compositor bokeh blur - only use the variable size operation when the size socket is connected.
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/nodes/COM_BokehBlurNode.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/compositor/nodes/COM_BokehBlurNode.cpp b/source/blender/compositor/nodes/COM_BokehBlurNode.cpp
index 9abf97aa16f..70f20e3235b 100644
--- a/source/blender/compositor/nodes/COM_BokehBlurNode.cpp
+++ b/source/blender/compositor/nodes/COM_BokehBlurNode.cpp
@@ -38,7 +38,11 @@ void BokehBlurNode::convertToOperations(ExecutionSystem *graph, CompositorContex
{
bNode *b_node = this->getbNode();
- if (b_node->custom1 & CMP_NODEFLAG_BLUR_VARIABLE_SIZE) {
+ InputSocket *inputSizeSocket = this->getInputSocket(2);
+
+ bool connectedSizeSocket = inputSizeSocket->isConnected();
+
+ if ((b_node->custom1 & CMP_NODEFLAG_BLUR_VARIABLE_SIZE) && connectedSizeSocket) {
VariableSizeBokehBlurOperation *operation = new VariableSizeBokehBlurOperation();
this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), 0, graph);
@@ -55,9 +59,6 @@ void BokehBlurNode::convertToOperations(ExecutionSystem *graph, CompositorContex
}
else {
BokehBlurOperation *operation = new BokehBlurOperation();
- InputSocket *inputSizeSocket = this->getInputSocket(2);
-
- bool connectedSizeSocket = inputSizeSocket->isConnected();
const bNodeSocket *sock = this->getInputSocket(2)->getbNodeSocket();
const float size = ((const bNodeSocketValueFloat *)sock->default_value)->value;