diff options
author | Ton Roosendaal <ton@blender.org> | 2006-07-23 13:54:22 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-07-23 13:54:22 +0400 |
commit | 662d49f07677319c0a6cd488f06629b87d5889e8 (patch) | |
tree | 8759e99d597f7e7bb42815c084265c2dc3e04305 | |
parent | a6b0c136bb0dca8d351010a9f5e5154db77c3256 (diff) |
Bugfix #4773
The VectorBlur node crashed when it didn't get a RGBA type image as
input (like using Alpha as input). Added typeconversion for it.
Note: the Z input and Vector input are not converted, but checked for.
When an improper type gets connected to these inputs, an error is
printed in console.
-rw-r--r-- | source/blender/blenkernel/intern/node_composite.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node_composite.c b/source/blender/blenkernel/intern/node_composite.c index 4d42ac18f28..f6bae72e314 100644 --- a/source/blender/blenkernel/intern/node_composite.c +++ b/source/blender/blenkernel/intern/node_composite.c @@ -2837,12 +2837,18 @@ static void node_composit_exec_vecblur(void *data, bNode *node, bNodeStack **in, return; } + /* allow the input image to be of another type */ + img= typecheck_compbuf(in[0]->data, CB_RGBA); + new= dupalloc_compbuf(img); /* call special zbuffer version */ RE_zbuf_accumulate_vecblur(nbd, img->x, img->y, new->rect, img->rect, vecbuf->rect, zbuf->rect); out[0]->data= new; + + if(img!=in[0]->data) + free_compbuf(img); } /* custom1: itterations, custom2: maxspeed (0 = nolimit) */ |