diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-22 12:30:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-22 12:30:00 +0300 |
commit | 1e9bf0cfdb6c925b28af6f0330467e7d9d798c05 (patch) | |
tree | c8356d8bc812dc6e3f23b9c381e94ec4c9d4c879 /source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c | |
parent | 9b2dd9aac65aa49c05176bb8b7aabde9fe1aeeac (diff) |
spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c index aa282a78af1..0735a369d12 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c @@ -51,8 +51,8 @@ static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float * float alpha; difference=fabs(inColor2[0]-inColor1[0])+ - fabs(inColor2[1]-inColor1[1])+ - fabs(inColor2[2]-inColor1[2]); + fabs(inColor2[1]-inColor1[1])+ + fabs(inColor2[2]-inColor1[2]); /*average together the distances*/ difference=difference/3.0; @@ -61,19 +61,19 @@ static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float * /*make 100% transparent*/ if(difference < tolerence){ - outColor[3]=0.0; + outColor[3]=0.0; } /*in the falloff region, make partially transparent */ else if(difference < falloff+tolerence){ - difference=difference-tolerence; - alpha=difference/falloff; - /*only change if more transparent than before */ - if(alpha < inColor1[3]) { - outColor[3]=alpha; - } - else { /* leave as before */ - outColor[3]=inColor1[3]; - } + difference=difference-tolerence; + alpha=difference/falloff; + /*only change if more transparent than before */ + if(alpha < inColor1[3]) { + outColor[3]=alpha; + } + else { /* leave as before */ + outColor[3]=inColor1[3]; + } } else { /*foreground object*/ @@ -99,7 +99,7 @@ static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack ** /* if there's an image, use that, if not use the color */ if(in[1]->data) { - imbuf2=typecheck_compbuf(in[1]->data, CB_RGBA); + imbuf2=typecheck_compbuf(in[1]->data, CB_RGBA); } c=node->storage; |