fix for bug in variable size blur compositor node - using incorrect Y blur operations...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 24 Aug 2012 12:48:56 +0000 (12:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 24 Aug 2012 12:48:56 +0000 (12:48 +0000)
source/blender/compositor/nodes/COM_BlurNode.cpp
source/blender/compositor/operations/COM_BlurBaseOperation.cpp
source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp

index 93ef002c8d7456b3c9053ab7a3c3f7cbb2a62f1f..e39ef2b3f23c4d405bd499117e9c87fc125e5eef 100644 (file)
@@ -74,14 +74,18 @@ void BlurNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co
                operationx->setbNode(editorNode);
                operationx->setQuality(quality);
                operationx->setSize(1.0f);
+               operationx->setFalloff(PROP_SMOOTH);
+               operationx->setSubtract(false);
                addLink(graph, clamp->getOutputSocket(), operationx->getInputSocket(0));
                graph->addOperation(operationx);
 
-               GaussianYBlurOperation *operationy = new GaussianYBlurOperation();
+               GaussianAlphaYBlurOperation *operationy = new GaussianAlphaYBlurOperation();
                operationy->setData(data);
                operationy->setbNode(editorNode);
                operationy->setQuality(quality);
                operationy->setSize(1.0f);
+               operationy->setFalloff(PROP_SMOOTH);
+               operationy->setSubtract(false);
                addLink(graph, operationx->getOutputSocket(), operationy->getInputSocket(0));
                graph->addOperation(operationy);
 
index c527807f8394bd0b0581838a4e417d5fa8282005..39a0014ac411b9c88533ec395fc77acf6cd73d62 100644 (file)
@@ -121,6 +121,11 @@ float *BlurBaseOperation::make_dist_fac_inverse(int rad, int falloff)
                                val = val * val;
                                break;
                        case PROP_LIN:
+#ifndef NDEBUG
+                       /* uninitialized! */
+                       case -1:
+                               BLI_assert(0);
+#endif
                        default:
                                /* nothing */
                                break;
index 82f38556e823dd1d79b0c9db90fea18d9e14f04f..8c5e5faf12a3253587f9e394be55abda37c008e3 100644 (file)
@@ -33,6 +33,7 @@ GaussianAlphaXBlurOperation::GaussianAlphaXBlurOperation() : BlurBaseOperation(C
 {
        this->m_gausstab = NULL;
        this->m_rad = 0;
+       this->m_falloff = -1;  /* intentionally invalid, so we can detect uninitialized values */
 }
 
 void *GaussianAlphaXBlurOperation::initializeTileData(rcti *rect)
index bfd9564817e4223a291c43541e396ebc0ddc55cf..197715595ed2c566f54d9608bd659723675085f6 100644 (file)
@@ -33,6 +33,7 @@ GaussianAlphaYBlurOperation::GaussianAlphaYBlurOperation() : BlurBaseOperation(C
 {
        this->m_gausstab = NULL;
        this->m_rad = 0;
+       this->m_falloff = -1;  /* intentionally invalid, so we can detect uninitialized values */
 }
 
 void *GaussianAlphaYBlurOperation::initializeTileData(rcti *rect)