Revision: 47997
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47997
Author:   campbellbarton
Date:     2012-06-16 19:34:38 +0000 (Sat, 16 Jun 2012)
Log Message:
-----------
disable GaussianAlpha from attempting to get a non existing socket - and add an 
assert if this is attempted.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/intern/COM_NodeBase.cpp
    trunk/blender/source/blender/compositor/intern/COM_NodeBase.h
    
trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
    
trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp

Modified: trunk/blender/source/blender/compositor/intern/COM_NodeBase.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_NodeBase.cpp     
2012-06-16 16:57:16 UTC (rev 47996)
+++ trunk/blender/source/blender/compositor/intern/COM_NodeBase.cpp     
2012-06-16 19:34:38 UTC (rev 47997)
@@ -81,12 +81,14 @@
        return this->inputsockets.size() == 0;
 }
 
-OutputSocket *NodeBase::getOutputSocket(int index)
+OutputSocket *NodeBase::getOutputSocket(unsigned int index)
 {
+       BLI_assert(index < this->outputsockets.size());
        return this->outputsockets[index];
 }
 
-InputSocket *NodeBase::getInputSocket(int index)
+InputSocket *NodeBase::getInputSocket(unsigned int index)
 {
+       BLI_assert(index < this->inputsockets.size());
        return this->inputsockets[index];
 }

Modified: trunk/blender/source/blender/compositor/intern/COM_NodeBase.h
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_NodeBase.h       
2012-06-16 16:57:16 UTC (rev 47996)
+++ trunk/blender/source/blender/compositor/intern/COM_NodeBase.h       
2012-06-16 19:34:38 UTC (rev 47997)
@@ -103,7 +103,7 @@
         * @param index
         * the index of the needed outputsocket
         */
-       OutputSocket *getOutputSocket(const int index);
+       OutputSocket *getOutputSocket(const unsigned int index);
        
        /**
         * get the reference to the first outputsocket
@@ -117,7 +117,7 @@
         * @param index
         * the index of the needed inputsocket
         */
-       InputSocket *getInputSocket(const int index);
+       InputSocket *getInputSocket(const unsigned int index);
        
        
        virtual bool isStatic() const { return false; }

Modified: 
trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
      2012-06-16 16:57:16 UTC (rev 47996)
+++ 
trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
      2012-06-16 19:34:38 UTC (rev 47997)
@@ -45,7 +45,7 @@
 
 void GaussianAlphaXBlurOperation::initExecution()
 {
-       BlurBaseOperation::initExecution();
+       /* BlurBaseOperation::initExecution(); */ /* until we suppoer size 
input - comment this */
 
        if (this->sizeavailable) {
                float rad = size * this->data->sizex;

Modified: 
trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
      2012-06-16 16:57:16 UTC (rev 47996)
+++ 
trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
      2012-06-16 19:34:38 UTC (rev 47997)
@@ -45,6 +45,8 @@
 
 void GaussianAlphaYBlurOperation::initExecution()
 {
+       /* BlurBaseOperation::initExecution(); */ /* until we suppoer size 
input - comment this */
+
        if (this->sizeavailable) {
                float rad = size * this->data->sizey;
                if (rad < 1)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to