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')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c52
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c6
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c4
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_crop.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c26
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c26
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_gamma.c12
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_image.c122
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_math.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_rotate.c44
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c34
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c2
-rw-r--r--source/blender/nodes/intern/CMP_util.c28
-rw-r--r--source/blender/nodes/intern/CMP_util.h4
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c2
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_proc.c32
-rw-r--r--source/blender/nodes/intern/TEX_util.c6
17 files changed, 202 insertions, 202 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
index 701fe688f5f..b1fe0a2897b 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
@@ -69,32 +69,32 @@ static void do_channel_matte(bNode *node, float *out, float *in)
float alpha=0.0;
switch(c->algorithm) {
- case 0: { /* Alpha=key_channel-limit channel */
- int key_channel=node->custom2-1;
- int limit_channel=c->channel-1;
- alpha=in[key_channel]-in[limit_channel];
- break;
- }
- case 1: { /* Alpha=G-MAX(R, B) */
- switch(node->custom2) {
- case 1: {
- alpha=in[0]-MAX2(in[1],in[2]);
- break;
- }
- case 2: {
- alpha=in[1]-MAX2(in[0],in[2]);
- break;
- }
- case 3: {
- alpha=in[2]-MAX2(in[0],in[1]);
- break;
- }
- default:
- break;
- }
- }
- default:
- break;
+ case 0: { /* Alpha=key_channel-limit channel */
+ int key_channel=node->custom2-1;
+ int limit_channel=c->channel-1;
+ alpha=in[key_channel]-in[limit_channel];
+ break;
+ }
+ case 1: { /* Alpha=G-MAX(R, B) */
+ switch(node->custom2) {
+ case 1: {
+ alpha=in[0]-MAX2(in[1],in[2]);
+ break;
+ }
+ case 2: {
+ alpha=in[1]-MAX2(in[0],in[2]);
+ break;
+ }
+ case 3: {
+ alpha=in[2]-MAX2(in[0],in[1]);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ default:
+ break;
}
/*flip because 0.0 is transparent, not 1.0*/
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
index 44f690e1fa6..8d5f4688657 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
@@ -51,10 +51,10 @@ static void do_color_key(bNode *node, float *out, float *in)
VECCOPY(out, in);
if(fabs(in[0]-c->key[0]) < c->t1 &&
- fabs(in[1]-c->key[1]) < c->t2 &&
- fabs(in[2]-c->key[2]) < c->t3)
+ fabs(in[1]-c->key[1]) < c->t2 &&
+ fabs(in[2]-c->key[2]) < c->t3)
{
- out[3]=0.0; /*make transparent*/
+ out[3]=0.0; /*make transparent*/
}
else { /*pixel is outside key color */
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
index 23a5b719e5b..54fb1e384c3 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
@@ -109,7 +109,7 @@ static void do_apply_spillmap_green(bNode *node, float* out, float *in, float *m
out[0]=in[0]+(ncs->uspillr*map[0]);
out[1]=in[1]-(ncs->uspillg*map[0]);
out[2]=in[2]+(ncs->uspillb*map[0]);
- }
+ }
else {
out[0]=in[0];
out[1]=in[1];
@@ -125,7 +125,7 @@ static void do_apply_spillmap_blue(bNode *node, float* out, float *in, float *ma
out[0]=in[0]+(ncs->uspillr*map[0]);
out[1]=in[1]+(ncs->uspillg*map[0]);
out[2]=in[2]-(ncs->uspillb*map[0]);
- }
+ }
else {
out[0]=in[0];
out[1]=in[1];
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_crop.c b/source/blender/nodes/intern/CMP_nodes/CMP_crop.c
index 00038f6fde2..c2edb3dd52f 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_crop.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_crop.c
@@ -83,7 +83,7 @@ static void node_composit_exec_crop(void *data, bNode *node, bNodeStack **in, bN
srcfp= cbuf->rect + (y * cbuf->x + outputrect.xmin) * cbuf->type;
outfp= stackbuf->rect + (y * stackbuf->x + outputrect.xmin) * stackbuf->type;
for(x=outputrect.xmin; x<outputrect.xmax; x++, outfp+= stackbuf->type, srcfp+= cbuf->type)
- memcpy(outfp, srcfp, sizeof(float)*stackbuf->type);
+ memcpy(outfp, srcfp, sizeof(float)*stackbuf->type);
}
}
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;
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
index 4213a5f5389..e0e595fc8f6 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
@@ -53,29 +53,29 @@ static void do_distance_matte(bNode *node, float *out, float *in)
float alpha;
distance=sqrt((c->key[0]-in[0])*(c->key[0]-in[0]) +
- (c->key[1]-in[1])*(c->key[1]-in[1]) +
- (c->key[2]-in[2])*(c->key[2]-in[2]));
+ (c->key[1]-in[1])*(c->key[1]-in[1]) +
+ (c->key[2]-in[2])*(c->key[2]-in[2]));
VECCOPY(out, in);
/*make 100% transparent */
if(distance < tolerence) {
- out[3]=0.0;
+ out[3]=0.0;
}
/*in the falloff region, make partially transparent */
else if(distance < falloff+tolerence){
- distance=distance-tolerence;
- alpha=distance/falloff;
- /*only change if more transparent than before */
- if(alpha < in[3]) {
- out[3]=alpha;
- }
- else { /* leave as before */
- out[3]=in[3];
- }
+ distance=distance-tolerence;
+ alpha=distance/falloff;
+ /*only change if more transparent than before */
+ if(alpha < in[3]) {
+ out[3]=alpha;
+ }
+ else { /* leave as before */
+ out[3]=in[3];
+ }
}
else {
- out[3]=in[3];
+ out[3]=in[3];
}
}
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c b/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c
index 1726347b367..c0e524a3ae9 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c
@@ -35,7 +35,7 @@
static bNodeSocketType cmp_node_gamma_in[]= {
{ SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Gamma", 1.0f, 0.0f, 0.0f, 0.0f, 0.001f, 10.0f},
- { -1, 0, "" }
+ { -1, 0, "" }
};
static bNodeSocketType cmp_node_gamma_out[]= {
{ SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
@@ -82,11 +82,11 @@ bNodeType cmp_node_gamma= {
/* output sock */ cmp_node_gamma_out,
/* storage */ "",
/* execfunc */ node_composit_exec_gamma,
- /* butfunc */ NULL,
- /* initfunc */ NULL,
- /* freestoragefunc */ NULL,
- /* copysotragefunc */ NULL,
- /* id */ NULL
+ /* butfunc */ NULL,
+ /* initfunc */ NULL,
+ /* freestoragefunc */ NULL,
+ /* copysotragefunc */ NULL,
+ /* id */ NULL
};
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
index a5063702365..be91eb61587 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
@@ -293,23 +293,23 @@ static CompBuf *compbuf_from_pass(RenderData *rd, RenderLayer *rl, int rectx, in
{
float *fp= RE_RenderLayerGetPass(rl, passcode);
if(fp) {
- CompBuf *buf;
- int buftype= CB_VEC3;
-
- if(ELEM3(passcode, SCE_PASS_Z, SCE_PASS_INDEXOB, SCE_PASS_MIST))
- buftype= CB_VAL;
- else if(passcode==SCE_PASS_VECTOR)
- buftype= CB_VEC4;
- else if(ELEM(passcode, SCE_PASS_COMBINED, SCE_PASS_RGBA))
- buftype= CB_RGBA;
-
- if(rd->scemode & R_COMP_CROP)
- buf= get_cropped_compbuf(&rd->disprect, fp, rectx, recty, buftype);
- else {
- buf= alloc_compbuf(rectx, recty, buftype, 0);
- buf->rect= fp;
- }
- return buf;
+ CompBuf *buf;
+ int buftype= CB_VEC3;
+
+ if(ELEM3(passcode, SCE_PASS_Z, SCE_PASS_INDEXOB, SCE_PASS_MIST))
+ buftype= CB_VAL;
+ else if(passcode==SCE_PASS_VECTOR)
+ buftype= CB_VEC4;
+ else if(ELEM(passcode, SCE_PASS_COMBINED, SCE_PASS_RGBA))
+ buftype= CB_RGBA;
+
+ if(rd->scemode & R_COMP_CROP)
+ buf= get_cropped_compbuf(&rd->disprect, fp, rectx, recty, buftype);
+ else {
+ buf= alloc_compbuf(rectx, recty, buftype, 0);
+ buf->rect= fp;
+ }
+ return buf;
}
return NULL;
};
@@ -317,30 +317,30 @@ static CompBuf *compbuf_from_pass(RenderData *rd, RenderLayer *rl, int rectx, in
void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStack **out, int rectx, int recty)
{
if(out[RRES_OUT_Z]->hasoutput)
- out[RRES_OUT_Z]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_Z);
+ out[RRES_OUT_Z]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_Z);
if(out[RRES_OUT_VEC]->hasoutput)
- out[RRES_OUT_VEC]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_VECTOR);
+ out[RRES_OUT_VEC]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_VECTOR);
if(out[RRES_OUT_NORMAL]->hasoutput)
- out[RRES_OUT_NORMAL]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_NORMAL);
+ out[RRES_OUT_NORMAL]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_NORMAL);
if(out[RRES_OUT_UV]->hasoutput)
- out[RRES_OUT_UV]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_UV);
+ out[RRES_OUT_UV]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_UV);
if(out[RRES_OUT_RGBA]->hasoutput)
- out[RRES_OUT_RGBA]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_RGBA);
+ out[RRES_OUT_RGBA]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_RGBA);
if(out[RRES_OUT_DIFF]->hasoutput)
- out[RRES_OUT_DIFF]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_DIFFUSE);
+ out[RRES_OUT_DIFF]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_DIFFUSE);
if(out[RRES_OUT_SPEC]->hasoutput)
- out[RRES_OUT_SPEC]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_SPEC);
+ out[RRES_OUT_SPEC]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_SPEC);
if(out[RRES_OUT_SHADOW]->hasoutput)
- out[RRES_OUT_SHADOW]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_SHADOW);
+ out[RRES_OUT_SHADOW]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_SHADOW);
if(out[RRES_OUT_AO]->hasoutput)
- out[RRES_OUT_AO]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_AO);
+ out[RRES_OUT_AO]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_AO);
if(out[RRES_OUT_REFLECT]->hasoutput)
- out[RRES_OUT_REFLECT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_REFLECT);
+ out[RRES_OUT_REFLECT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_REFLECT);
if(out[RRES_OUT_REFRACT]->hasoutput)
- out[RRES_OUT_REFRACT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_REFRACT);
+ out[RRES_OUT_REFRACT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_REFRACT);
if(out[RRES_OUT_INDIRECT]->hasoutput)
- out[RRES_OUT_INDIRECT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDIRECT);
+ out[RRES_OUT_INDIRECT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDIRECT);
if(out[RRES_OUT_INDEXOB]->hasoutput)
out[RRES_OUT_INDEXOB]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDEXOB);
if(out[RRES_OUT_MIST]->hasoutput)
@@ -362,38 +362,38 @@ static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **in,
rr= RE_AcquireResultRead(re);
if(rr) {
- SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1);
- if(srl) {
- RenderLayer *rl= RE_GetRenderLayer(rr, srl->name);
- if(rl && rl->rectf) {
- CompBuf *stackbuf;
-
- /* we put render rect on stack, cbuf knows rect is from other ibuf when freed! */
- if(rd->scemode & R_COMP_CROP)
- stackbuf= get_cropped_compbuf(&rd->disprect, rl->rectf, rr->rectx, rr->recty, CB_RGBA);
- else {
- stackbuf= alloc_compbuf(rr->rectx, rr->recty, CB_RGBA, 0);
- stackbuf->rect= rl->rectf;
- }
- if(stackbuf==NULL) {
- printf("Error; Preview Panel in UV Window returns zero sized image\n");
- }
- else {
- stackbuf->xof= rr->xof;
- stackbuf->yof= rr->yof;
-
- /* put on stack */
- out[RRES_OUT_IMAGE]->data= stackbuf;
-
- if(out[RRES_OUT_ALPHA]->hasoutput)
- out[RRES_OUT_ALPHA]->data= valbuf_from_rgbabuf(stackbuf, CHAN_A);
-
- node_composit_rlayers_out(rd, rl, out, rr->rectx, rr->recty);
-
- generate_preview(data, node, stackbuf);
- }
- }
- }
+ SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1);
+ if(srl) {
+ RenderLayer *rl= RE_GetRenderLayer(rr, srl->name);
+ if(rl && rl->rectf) {
+ CompBuf *stackbuf;
+
+ /* we put render rect on stack, cbuf knows rect is from other ibuf when freed! */
+ if(rd->scemode & R_COMP_CROP)
+ stackbuf= get_cropped_compbuf(&rd->disprect, rl->rectf, rr->rectx, rr->recty, CB_RGBA);
+ else {
+ stackbuf= alloc_compbuf(rr->rectx, rr->recty, CB_RGBA, 0);
+ stackbuf->rect= rl->rectf;
+ }
+ if(stackbuf==NULL) {
+ printf("Error; Preview Panel in UV Window returns zero sized image\n");
+ }
+ else {
+ stackbuf->xof= rr->xof;
+ stackbuf->yof= rr->yof;
+
+ /* put on stack */
+ out[RRES_OUT_IMAGE]->data= stackbuf;
+
+ if(out[RRES_OUT_ALPHA]->hasoutput)
+ out[RRES_OUT_ALPHA]->data= valbuf_from_rgbabuf(stackbuf, CHAN_A);
+
+ node_composit_rlayers_out(rd, rl, out, rr->rectx, rr->recty);
+
+ generate_preview(data, node, stackbuf);
+ }
+ }
+ }
}
if(re)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_math.c b/source/blender/nodes/intern/CMP_nodes/CMP_math.c
index f61d98692fd..f663dc76b5c 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_math.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_math.c
@@ -171,7 +171,7 @@ static void node_composit_exec_math(void *data, bNode *node, bNodeStack **in, bN
stackbuf=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1);
}
/* and if it doesn't exist use the second input since we
- know that one of them must exist at this point*/
+ know that one of them must exist at this point*/
else {
stackbuf=alloc_compbuf(cbuf2->x, cbuf2->y, CB_VAL, 1);
}
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c b/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
index 4da0b20c6f8..4103981af46 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
@@ -53,7 +53,7 @@ static void node_composit_exec_rotate(void *data, bNode *node, bNodeStack **in,
CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* note, this returns zero'd image */
float rad, u, v, s, c, centx, centy, miny, maxy, minx, maxx;
int x, y, yo, xo;
- ImBuf *ibuf, *obuf;
+ ImBuf *ibuf, *obuf;
rad= (M_PI*in[1]->vec[0])/180.0f;
@@ -68,36 +68,36 @@ static void node_composit_exec_rotate(void *data, bNode *node, bNodeStack **in,
maxy= -centy + (float)cbuf->y;
- ibuf=IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0, 0);
- obuf=IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0, 0);
+ ibuf=IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0, 0);
+ obuf=IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0, 0);
- if(ibuf){
- ibuf->rect_float=cbuf->rect;
- obuf->rect_float=stackbuf->rect;
+ if(ibuf){
+ ibuf->rect_float=cbuf->rect;
+ obuf->rect_float=stackbuf->rect;
for(y=miny; y<maxy; y++) {
yo= y+(int)centy;
- for(x=minx; x<maxx;x++) {
- u=c*x + y*s + centx;
- v=-s*x + c*y + centy;
- xo= x+(int)centx;
+ for(x=minx; x<maxx;x++) {
+ u=c*x + y*s + centx;
+ v=-s*x + c*y + centy;
+ xo= x+(int)centx;
- switch(node->custom1) {
- case 0:
- neareast_interpolation(ibuf, obuf, u, v, xo, yo);
- break ;
- case 1:
- bilinear_interpolation(ibuf, obuf, u, v, xo, yo);
- break;
- case 2:
- bicubic_interpolation(ibuf, obuf, u, v, xo, yo);
- }
+ switch(node->custom1) {
+ case 0:
+ neareast_interpolation(ibuf, obuf, u, v, xo, yo);
+ break ;
+ case 1:
+ bilinear_interpolation(ibuf, obuf, u, v, xo, yo);
+ break;
+ case 2:
+ bicubic_interpolation(ibuf, obuf, u, v, xo, yo);
+ }
- }
+ }
}
- /* rotate offset vector too, but why negative rad, ehh?? Has to be replaced with [3][3] matrix once (ton) */
+ /* rotate offset vector too, but why negative rad, ehh?? Has to be replaced with [3][3] matrix once (ton) */
s= sin(-rad);
c= cos(-rad);
centx= (float)cbuf->xof; centy= (float)cbuf->yof;
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
index 0edacd20e6d..d80dd9b0a4b 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
@@ -145,29 +145,29 @@ static void node_composit_exec_combhsva(void *data, bNode *node, bNodeStack **in
/* input no image? then only color operation */
if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) {
- out[0]->vec[0] = in[0]->vec[0];
- out[0]->vec[1] = in[1]->vec[0];
- out[0]->vec[2] = in[2]->vec[0];
- out[0]->vec[3] = in[3]->vec[0];
+ out[0]->vec[0] = in[0]->vec[0];
+ out[0]->vec[1] = in[1]->vec[0];
+ out[0]->vec[2] = in[2]->vec[0];
+ out[0]->vec[3] = in[3]->vec[0];
}
else {
- /* make output size of first available input image */
- CompBuf *cbuf;
- CompBuf *stackbuf;
+ /* make output size of first available input image */
+ CompBuf *cbuf;
+ CompBuf *stackbuf;
- /* allocate a CompBuf the size of the first available input */
- if (in[0]->data) cbuf = in[0]->data;
- else if (in[1]->data) cbuf = in[1]->data;
- else if (in[2]->data) cbuf = in[2]->data;
- else cbuf = in[3]->data;
+ /* allocate a CompBuf the size of the first available input */
+ if (in[0]->data) cbuf = in[0]->data;
+ else if (in[1]->data) cbuf = in[1]->data;
+ else if (in[2]->data) cbuf = in[2]->data;
+ else cbuf = in[3]->data;
- stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */
+ stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */
- composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec,
- in[2]->data, in[2]->vec, in[3]->data, in[3]->vec,
- do_comb_hsva, CB_VAL, CB_VAL, CB_VAL, CB_VAL);
+ composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec,
+ in[2]->data, in[2]->vec, in[3]->data, in[3]->vec,
+ do_comb_hsva, CB_VAL, CB_VAL, CB_VAL, CB_VAL);
- out[0]->data= stackbuf;
+ out[0]->data= stackbuf;
}
}
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c b/source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c
index 020b3797074..7be9f34f00b 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c
@@ -31,7 +31,7 @@
/* **************** Z COMBINE ******************** */
- /* lazy coder note: node->custom1 is abused to send signal */
+ /* lazy coder note: node->custom1 is abused to send signal */
static bNodeSocketType cmp_node_zcombine_in[]= {
{ SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f},
diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/intern/CMP_util.c
index 1d64cf0b45f..6e53e8bb968 100644
--- a/source/blender/nodes/intern/CMP_util.c
+++ b/source/blender/nodes/intern/CMP_util.c
@@ -725,18 +725,18 @@ void gamma_correct_compbuf(CompBuf *img, int inversed)
drect= img->rect;
if(inversed) {
- for(x=img->x*img->y; x>0; x--, drect+=4) {
- if(drect[0]>0.0f) drect[0]= sqrt(drect[0]); else drect[0]= 0.0f;
- if(drect[1]>0.0f) drect[1]= sqrt(drect[1]); else drect[1]= 0.0f;
- if(drect[2]>0.0f) drect[2]= sqrt(drect[2]); else drect[2]= 0.0f;
- }
+ for(x=img->x*img->y; x>0; x--, drect+=4) {
+ if(drect[0]>0.0f) drect[0]= sqrt(drect[0]); else drect[0]= 0.0f;
+ if(drect[1]>0.0f) drect[1]= sqrt(drect[1]); else drect[1]= 0.0f;
+ if(drect[2]>0.0f) drect[2]= sqrt(drect[2]); else drect[2]= 0.0f;
+ }
}
else {
- for(x=img->x*img->y; x>0; x--, drect+=4) {
- if(drect[0]>0.0f) drect[0]*= drect[0]; else drect[0]= 0.0f;
- if(drect[1]>0.0f) drect[1]*= drect[1]; else drect[1]= 0.0f;
- if(drect[2]>0.0f) drect[2]*= drect[2]; else drect[2]= 0.0f;
- }
+ for(x=img->x*img->y; x>0; x--, drect+=4) {
+ if(drect[0]>0.0f) drect[0]*= drect[0]; else drect[0]= 0.0f;
+ if(drect[1]>0.0f) drect[1]*= drect[1]; else drect[1]= 0.0f;
+ if(drect[2]>0.0f) drect[2]*= drect[2]; else drect[2]= 0.0f;
+ }
}
}
@@ -749,7 +749,7 @@ void premul_compbuf(CompBuf *img, int inversed)
drect= img->rect;
if(inversed) {
- for(x=img->x*img->y; x>0; x--, drect+=4) {
+ for(x=img->x*img->y; x>0; x--, drect+=4) {
if(fabs(drect[3]) < 1e-5f) {
drect[0]= 0.0f;
drect[1]= 0.0f;
@@ -760,14 +760,14 @@ void premul_compbuf(CompBuf *img, int inversed)
drect[1] /= drect[3];
drect[2] /= drect[3];
}
- }
+ }
}
else {
- for(x=img->x*img->y; x>0; x--, drect+=4) {
+ for(x=img->x*img->y; x>0; x--, drect+=4) {
drect[0] *= drect[3];
drect[1] *= drect[3];
drect[2] *= drect[3];
- }
+ }
}
}
diff --git a/source/blender/nodes/intern/CMP_util.h b/source/blender/nodes/intern/CMP_util.h
index ae3fe97b21a..4b6b5551146 100644
--- a/source/blender/nodes/intern/CMP_util.h
+++ b/source/blender/nodes/intern/CMP_util.h
@@ -185,8 +185,8 @@ typedef float fRGB[4];
#define fRGB_rgbmult(c, r, g, b) { c[0]*=(r); c[1]*=(g); c[2]*=(b); }
/* swap colors c1 & c2 */
#define fRGB_swap(c1, c2) { float _t=c1[0]; c1[0]=c2[0]; c2[0]=_t;\
- _t=c1[1]; c1[1]=c2[1]; c2[1]=_t;\
- _t=c1[2]; c1[2]=c2[2]; c2[2]=_t;\
+ _t=c1[1]; c1[1]=c2[1]; c2[1]=_t;\
+ _t=c1[2]; c1[2]=c2[2]; c2[2]=_t;\
_t=c1[3]; c1[3]=c2[3]; c3[3]=_t;}
void qd_getPixel(CompBuf* src, int x, int y, float* col);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c b/source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c
index 18972aa4b0b..926dcd0f046 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c
@@ -51,7 +51,7 @@ bNodeStack **out)
nodestack_get_vec(vec+1, SOCK_VALUE, in[1]);
nodestack_get_vec(vec+2, SOCK_VALUE, in[2]);
- out[0]->vec[0] = 1.0f / (1.0f + pow(2.71828183,-((vec[0]-vec[2])*vec[1]))) ;
+ out[0]->vec[0] = 1.0f / (1.0f + pow(2.71828183,-((vec[0]-vec[2])*vec[1]))) ;
}
static int gpu_shader_squeeze(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c b/source/blender/nodes/intern/TEX_nodes/TEX_proc.c
index 16b65a4b0be..3e7ef0e94fe 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_proc.c
@@ -111,24 +111,24 @@ static int count_outputs(bNode *node)
/* Boilerplate generators */
#define ProcNoInputs(name) \
- static void name##_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) \
- {}
+ static void name##_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) \
+ {}
#define ProcDef(name) \
- static void name##_colorfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \
- { \
- texfn(result, p, node, in, 0, &name##_map_inputs, thread); \
- } \
- static void name##_normalfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \
- { \
- texfn(result, p, node, in, 1, &name##_map_inputs, thread); \
- } \
- static void name##_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) \
- { \
- int outs = count_outputs(node); \
- if(outs >= 1) tex_output(node, in, out[0], &name##_colorfn, data); \
- if(outs >= 2) tex_output(node, in, out[1], &name##_normalfn, data); \
- }
+ static void name##_colorfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \
+ { \
+ texfn(result, p, node, in, 0, &name##_map_inputs, thread); \
+ } \
+ static void name##_normalfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \
+ { \
+ texfn(result, p, node, in, 1, &name##_map_inputs, thread); \
+ } \
+ static void name##_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) \
+ { \
+ int outs = count_outputs(node); \
+ if(outs >= 1) tex_output(node, in, out[0], &name##_colorfn, data); \
+ if(outs >= 2) tex_output(node, in, out[1], &name##_normalfn, data); \
+ }
/* --- VORONOI -- */
diff --git a/source/blender/nodes/intern/TEX_util.c b/source/blender/nodes/intern/TEX_util.c
index f471198d8ee..dc31685827f 100644
--- a/source/blender/nodes/intern/TEX_util.c
+++ b/source/blender/nodes/intern/TEX_util.c
@@ -35,11 +35,11 @@
the TexDelegate* from its input stack, and uses tex_call_delegate to
retrieve the colour from the delegate.
- comments: (ton)
+ comments: (ton)
- This system needs recode, a node system should rely on the stack, and
+ This system needs recode, a node system should rely on the stack, and
callbacks for nodes only should evaluate own node, not recursively go
- over other previous ones.
+ over other previous ones.
*/
#include <assert.h>