[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18806] trunk/blender/source/blender/nodes /intern/CMP_nodes/CMP_blur.c: Relative option for the blur node only applied when the UI updated.

Campbell Barton ideasman42 at gmail.com
Wed Feb 4 07:42:23 CET 2009


Revision: 18806
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18806
Author:   campbellbarton
Date:     2009-02-04 07:41:48 +0100 (Wed, 04 Feb 2009)

Log Message:
-----------
Relative option for the blur node only applied when the UI updated.
This meant that changing the image size later on would still use the old size.

Set the relative blur size when executing the node too.

Modified Paths:
--------------
    trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_blur.c

Modified: trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_blur.c	2009-02-04 05:15:39 UTC (rev 18805)
+++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_blur.c	2009-02-04 06:41:48 UTC (rev 18806)
@@ -567,6 +567,11 @@
 	
 	if(out[0]->hasoutput==0) return;
 	
+	if(nbd->relative) {
+		nbd->sizex= (int)(nbd->percentx*nbd->image_in_width);
+		nbd->sizey= (int)(nbd->percenty*nbd->image_in_height);
+	}
+
 	if (((NodeBlurData *)node->storage)->filtertype == R_FILTER_FAST_GAUSS) {
 		CompBuf *new, *img = in[0]->data;
 		/*from eeshlo's original patch, removed to fit in with the existing blur node */





More information about the Bf-blender-cvs mailing list