diff options
author | Robert Holcomb <bob_holcomb@hotmail.com> | 2007-07-11 07:33:28 +0400 |
---|---|---|
committer | Robert Holcomb <bob_holcomb@hotmail.com> | 2007-07-11 07:33:28 +0400 |
commit | f628b9c442c75001fc28c85fdf37326a545f90c4 (patch) | |
tree | 6bf3d08391aa8eaa2515dd0c00cadde8ec939530 /source/blender/nodes/intern/CMP_nodes/CMP_math.c | |
parent | c313f6db86e06ca4927a0d0ce3abb753e2ecfc7d (diff) |
One more time....I misunderstood the guidance about values as inputs for
the math node. Now it functions with two values as inputs (no image
neccissary). Kinda back where it started ;)
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_math.c')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_math.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_math.c b/source/blender/nodes/intern/CMP_nodes/CMP_math.c index e909b5a3ae3..e267dc6f44c 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_math.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_math.c @@ -143,9 +143,14 @@ static void node_composit_exec_math(void *data, bNode *node, bNodeStack **in, bN /* check for inputs and outputs for early out*/ if(in[0]->hasinput==0 || in[1]->hasinput==0) return; - if(in[0]->data==NULL && in[1]->data==NULL) return; if(out[0]->hasoutput==0) return; + /* no image-color operation */ + if(in[0]->data==NULL && in[1]->data==NULL) { + do_math(node, out[0]->vec, in[0]->vec, in[1]->vec); + return; + } + /*create output based on first input */ if(cbuf) { stackbuf=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); |