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:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-02-10 21:54:49 +0300
committerLukas Toenne <lukas.toenne@googlemail.com>2011-02-10 21:54:49 +0300
commitcbe53cc48d5e4460c2d04d1344bd30a882b2cadb (patch)
tree1756e0745264fa298165d003dc374e2635e5c2ed /source/blender/nodes/intern
parentf7595e98828c1e47db934f61cae6dfe65e1b950c (diff)
More options for the blur node filter size. This can now be pixel based or relative to both axes or just either width or height.
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_blur.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
index 78a27bc5b16..d92ee6924c9 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
@@ -577,9 +577,17 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
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);
+ switch (nbd->size_type) {
+ case CMP_NODE_BLUR_SIZE_WIDTH:
+ nbd->sizex= nbd->sizey= (int)(nbd->percentx*0.01f*nbd->image_in_width);
+ break;
+ case CMP_NODE_BLUR_SIZE_HEIGHT:
+ nbd->sizex= nbd->sizey= (int)(nbd->percenty*0.01f*nbd->image_in_height);
+ break;
+ case CMP_NODE_BLUR_SIZE_BOTH:
+ nbd->sizex= (int)(nbd->percentx*0.01f*nbd->image_in_width);
+ nbd->sizey= (int)(nbd->percenty*0.01f*nbd->image_in_height);
+ break;
}
if (nbd->sizex==0 && nbd->sizey==0) {