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:
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_zcombine.c')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_zcombine.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_zcombine.c b/source/blender/nodes/composite/nodes/node_composite_zcombine.c
index 57b0b7bbf14..64342751e84 100644
--- a/source/blender/nodes/composite/nodes/node_composite_zcombine.c
+++ b/source/blender/nodes/composite/nodes/node_composite_zcombine.c
@@ -53,7 +53,7 @@ static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *
float alpha;
float malpha;
- if(*z1 <= *z2) {
+ if (*z1 <= *z2) {
if (node->custom1) {
// use alpha in combine operation
alpha= src1[3];
@@ -83,16 +83,16 @@ static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *
copy_v4_v4(out, src1);
}
- if(node->custom2)
+ if (node->custom2)
*z1= *z2;
}
}
static void do_zcombine_mask(bNode *node, float *out, float *z1, float *z2)
{
- if(*z1 > *z2) {
+ if (*z1 > *z2) {
*out= 1.0f;
- if(node->custom2)
+ if (node->custom2)
*z1= *z2;
}
}
@@ -145,24 +145,24 @@ static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in
/* stack order in: col z col z */
/* stack order out: col z */
- if(out[0]->hasoutput==0 && out[1]->hasoutput==0)
+ if (out[0]->hasoutput==0 && out[1]->hasoutput==0)
return;
/* no input image; do nothing now */
- if(in[0]->data==NULL) {
+ if (in[0]->data==NULL) {
return;
}
- if(out[1]->hasoutput) {
+ if (out[1]->hasoutput) {
/* copy or make a buffer for for the first z value, here we write result in */
- if(in[1]->data)
+ if (in[1]->data)
zbuf= dupalloc_compbuf(in[1]->data);
else {
float *zval;
int tot= cbuf->x*cbuf->y;
zbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1);
- for(zval= zbuf->rect; tot; tot--, zval++)
+ for (zval= zbuf->rect; tot; tot--, zval++)
*zval= in[1]->vec[0];
}
/* lazy coder hack */
@@ -174,7 +174,7 @@ static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in
zbuf= in[1]->data;
}
- if(rd->scemode & R_FULL_SAMPLE) {
+ if (rd->scemode & R_FULL_SAMPLE) {
/* make output size of first input image */
CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); // allocs
@@ -199,16 +199,16 @@ static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in
/* convert to char */
aabuf= MEM_mallocN(cbuf->x*cbuf->y, "aa buf");
fp= mbuf->rect;
- for(x= cbuf->x*cbuf->y-1; x>=0; x--)
- if(fp[x]==0.0f) aabuf[x]= 0;
+ for (x= cbuf->x*cbuf->y-1; x>=0; x--)
+ if (fp[x]==0.0f) aabuf[x]= 0;
else aabuf[x]= 255;
antialias_tagbuf(cbuf->x, cbuf->y, aabuf);
/* convert to float */
fp= mbuf->rect;
- for(x= cbuf->x*cbuf->y-1; x>=0; x--)
- if(aabuf[x]>1)
+ for (x= cbuf->x*cbuf->y-1; x>=0; x--)
+ if (aabuf[x]>1)
fp[x]= (1.0f/255.0f)*(float)aabuf[x];
composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[2]->data, in[2]->vec, mbuf, NULL,