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>2010-10-12 01:08:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-12 01:08:26 +0400
commit544b3178f92618f0b5f450cd18ef9195556acd9f (patch)
tree02b868071b33925979caf9da6876d938922d02d1 /source/blender
parent3a369128b43a9d19846151de8a37e8a07ca2f423 (diff)
bugfix [#24225] Blur Node ignores gamma option when size has input.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_blur.c21
1 files changed, 18 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 257b8354ea9..894cc20e999 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
@@ -582,7 +582,11 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
nbd->sizey= (int)(nbd->percenty*nbd->image_in_height);
}
- if (((NodeBlurData *)node->storage)->filtertype == R_FILTER_FAST_GAUSS) {
+ if (nbd->sizex==0 && nbd->sizey==0) {
+ new= pass_on_compbuf(img);
+ out[0]->data= new;
+ }
+ else if (nbd->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 */
/*const float sx = in[1]->vec[0], sy = in[2]->vec[0];*/
@@ -622,6 +626,7 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
/* if fac input, we do it different */
if(in[1]->data) {
+ CompBuf *gammabuf;
/* make output size of input image */
new= alloc_compbuf(img->x, img->y, img->type, 1); /* allocs */
@@ -630,7 +635,18 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
new->xof = img->xof;
new->yof = img->yof;
- blur_with_reference(node, new, img, in[1]->data);
+ if(nbd->gamma) {
+ gammabuf= dupalloc_compbuf(img);
+ gamma_correct_compbuf(gammabuf, 0);
+ }
+ else gammabuf= img;
+
+ blur_with_reference(node, new, gammabuf, in[1]->data);
+
+ if(nbd->gamma) {
+ gamma_correct_compbuf(new, 1);
+ free_compbuf(gammabuf);
+ }
if(node->exec & NODE_BREAK) {
free_compbuf(new);
new= NULL;
@@ -643,7 +659,6 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
new= pass_on_compbuf(img);
}
else {
- NodeBlurData *nbd= node->storage;
CompBuf *gammabuf;
/* make output size of input image */