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:
authorCampbell Barton <ideasman42@gmail.com>2011-04-21 19:53:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-21 19:53:30 +0400
commitf9f771cd01b626be30a85a533ea622bcedd981f5 (patch)
tree45c3744fc35aeeebfcfd641ea3c0b3b9aa6303fe /source/blender/nodes/intern/CMP_nodes
parent210ee1ade4b4ec5b6f2d3710986171a21a4b8604 (diff)
converted more mixed tab/space indentations to tabs. only whitespace changes.
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_blur.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c100
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c48
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c28
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c193
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_crop.c12
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_curves.c10
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_defocus.c26
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c72
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c58
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c10
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_image.c132
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_invert.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_levels.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c8
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c70
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c12
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c8
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_viewer.c10
22 files changed, 403 insertions, 406 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c b/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c
index cba7e150633..9dcdfaf21e6 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c
@@ -142,7 +142,7 @@ static void node_composit_exec_alphaover(void *UNUSED(data), bNode *node, bNodeS
static void node_alphaover_init(bNode* node)
{
- node->storage= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
+ node->storage= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
}
void register_node_type_cmp_alphaover(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
index 1031ab3d360..2b33126b3a7 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
@@ -715,7 +715,7 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
static void node_composit_init_blur(bNode* node)
{
- node->storage= MEM_callocN(sizeof(NodeBlurData), "node blur data");
+ node->storage= MEM_callocN(sizeof(NodeBlurData), "node blur data");
}
void register_node_type_cmp_blur(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
index cdd360dc0fe..b32c531d8f9 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
@@ -74,34 +74,34 @@ 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 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;
- }
+ alpha=in[0]-MAX2(in[1],in[2]);
+ break;
+ }
case 2: {
- alpha=in[1]-MAX2(in[0],in[2]);
- break;
- }
+ alpha=in[1]-MAX2(in[0],in[2]);
+ break;
+ }
case 3: {
- alpha=in[2]-MAX2(in[0],in[1]);
- break;
- }
+ alpha=in[2]-MAX2(in[0],in[1]);
+ break;
+ }
default:
break;
- }
- }
- default:
- break;
- }
-
+ }
+ }
+ default:
+ break;
+ }
+
/*flip because 0.0 is transparent, not 1.0*/
alpha=1-alpha;
@@ -124,7 +124,6 @@ static void do_channel_matte(bNode *node, float *out, float *in)
else {
out[3]=in[3];
}
-
}
static void node_composit_exec_channel_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
@@ -132,7 +131,7 @@ static void node_composit_exec_channel_matte(void *data, bNode *node, bNodeStack
CompBuf *cbuf;
CompBuf *outbuf;
- if(in[0]->hasinput==0) return;
+ if(in[0]->hasinput==0) return;
if(in[0]->data==NULL) return;
if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return;
@@ -142,24 +141,24 @@ static void node_composit_exec_channel_matte(void *data, bNode *node, bNodeStack
/*convert to colorspace*/
switch(node->custom1) {
- case CMP_NODE_CHANNEL_MATTE_CS_RGB:
- break;
- case CMP_NODE_CHANNEL_MATTE_CS_HSV: /*HSV*/
- composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_hsva, CB_RGBA);
- break;
- case CMP_NODE_CHANNEL_MATTE_CS_YUV: /*YUV*/
- composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_yuva, CB_RGBA);
- break;
- case CMP_NODE_CHANNEL_MATTE_CS_YCC: /*YCC*/
- composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_normalized_rgba_to_ycca2, CB_RGBA);
- break;
- default:
- break;
+ case CMP_NODE_CHANNEL_MATTE_CS_RGB:
+ break;
+ case CMP_NODE_CHANNEL_MATTE_CS_HSV: /*HSV*/
+ composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_hsva, CB_RGBA);
+ break;
+ case CMP_NODE_CHANNEL_MATTE_CS_YUV: /*YUV*/
+ composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_yuva, CB_RGBA);
+ break;
+ case CMP_NODE_CHANNEL_MATTE_CS_YCC: /*YCC*/
+ composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_normalized_rgba_to_ycca2, CB_RGBA);
+ break;
+ default:
+ break;
}
/*use the selected channel information to do the key */
composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_channel_matte, CB_RGBA);
-
+
/*convert back to RGB colorspace in place*/
switch(node->custom1) {
case CMP_NODE_CHANNEL_MATTE_CS_RGB: /*RGB*/
@@ -189,17 +188,17 @@ static void node_composit_exec_channel_matte(void *data, bNode *node, bNodeStack
static void node_composit_init_channel_matte(bNode *node)
{
- NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
- node->storage=c;
- c->t1= 1.0f;
- c->t2= 0.0f;
- c->t3= 0.0f;
- c->fsize= 0.0f;
- c->fstrength= 0.0f;
- c->algorithm=1; /*max channel limiting */
- c->channel=1; /* limit by red */
- node->custom1= 1; /* RGB channel */
- node->custom2= 2; /* Green Channel */
+ NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
+ node->storage=c;
+ c->t1= 1.0f;
+ c->t2= 0.0f;
+ c->t3= 0.0f;
+ c->fsize= 0.0f;
+ c->fstrength= 0.0f;
+ c->algorithm=1; /*max channel limiting */
+ c->channel=1; /* limit by red */
+ node->custom1= 1; /* RGB channel */
+ node->custom2= 2; /* Green Channel */
}
void register_node_type_cmp_channel_matte(ListBase *lb)
@@ -215,4 +214,3 @@ void register_node_type_cmp_channel_matte(ListBase *lb)
nodeRegisterType(lb, &ntype);
}
-
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
index 94b086f1ba0..03230f2e212 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
@@ -49,17 +49,17 @@ static bNodeSocketType cmp_node_chroma_out[]={
static void do_rgba_to_ycca_normalized(bNode *UNUSED(node), float *out, float *in)
{
- rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
+ rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
- //normalize to 0..1.0
- out[0]=out[0]/255.0;
- out[1]=out[1]/255.0;
- out[2]=out[2]/255.0;
+ //normalize to 0..1.0
+ out[0]=out[0]/255.0;
+ out[1]=out[1]/255.0;
+ out[2]=out[2]/255.0;
- //rescale to -1.0..1.0
- out[0]=(out[0]*2.0)-1.0;
- out[1]=(out[1]*2.0)-1.0;
- out[2]=(out[2]*2.0)-1.0;
+ //rescale to -1.0..1.0
+ out[0]=(out[0]*2.0)-1.0;
+ out[1]=(out[1]*2.0)-1.0;
+ out[2]=(out[2]*2.0)-1.0;
// out[0]=((out[0])-16)/255.0;
// out[1]=((out[1])-128)/255.0;
@@ -69,16 +69,16 @@ static void do_rgba_to_ycca_normalized(bNode *UNUSED(node), float *out, float *i
static void do_ycca_to_rgba_normalized(bNode *UNUSED(node), float *out, float *in)
{
- /*un-normalize the normalize from above */
- in[0]=(in[0]+1.0)/2.0;
- in[1]=(in[1]+1.0)/2.0;
- in[2]=(in[2]+1.0)/2.0;
+ /*un-normalize the normalize from above */
+ in[0]=(in[0]+1.0)/2.0;
+ in[1]=(in[1]+1.0)/2.0;
+ in[2]=(in[2]+1.0)/2.0;
- in[0]=(in[0]*255.0);
- in[1]=(in[1]*255.0);
- in[2]=(in[2]*255.0);
+ in[0]=(in[0]*255.0);
+ in[1]=(in[1]*255.0);
+ in[2]=(in[2]*255.0);
-// in[0]=(in[0]*255.0)+16;
+ // in[0]=(in[0]*255.0)+16;
// in[1]=(in[1]*255.0)+128;
// in[2]=(in[2]*255.0)+128;
ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
@@ -180,13 +180,13 @@ static void node_composit_exec_chroma_matte(void *data, bNode *node, bNodeStack
static void node_composit_init_chroma_matte(bNode *node)
{
- NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
- node->storage= c;
- c->t1= 30.0f;
- c->t2= 10.0f;
- c->t3= 0.0f;
- c->fsize= 0.0f;
- c->fstrength= 1.0f;
+ NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
+ node->storage= c;
+ c->t1= 30.0f;
+ c->t2= 10.0f;
+ c->t3= 0.0f;
+ c->fsize= 0.0f;
+ c->fstrength= 1.0f;
}
void register_node_type_cmp_chroma_matte(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
index 90916284f1e..151850105b7 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
@@ -53,14 +53,14 @@ static void do_color_key(bNode *node, float *out, float *in)
c=node->storage;
- VECCOPY(out, 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)
- {
- out[3]=0.0; /*make transparent*/
- }
+ 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)
+ {
+ out[3]=0.0; /*make transparent*/
+ }
else { /*pixel is outside key color */
out[3]=in[3]; /* make pixel just as transparent as it was before */
@@ -108,13 +108,13 @@ static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack *
static void node_composit_init_color_matte(bNode *node)
{
- NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node color");
- node->storage= c;
- c->t1= 0.01f;
- c->t2= 0.1f;
- c->t3= 0.1f;
- c->fsize= 0.0f;
- c->fstrength= 1.0f;
+ NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node color");
+ node->storage= c;
+ c->t1= 0.01f;
+ c->t2= 0.1f;
+ c->t3= 0.1f;
+ c->fsize= 0.0f;
+ c->fstrength= 1.0f;
}
void register_node_type_cmp_color_matte(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
index c9997ba8a75..905d97709c3 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
@@ -39,8 +39,8 @@
/* ******************* Color Spill Supression ********************************* */
static bNodeSocketType cmp_node_color_spill_in[]={
- {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+ {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+ {SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{-1,0,""}
};
@@ -51,17 +51,17 @@ static bNodeSocketType cmp_node_color_spill_out[]={
static void do_simple_spillmap_red(bNode *node, float* out, float *in)
{
- NodeColorspill *ncs;
+ NodeColorspill *ncs;
ncs=node->storage;
out[0]=in[0]-( ncs->limscale * in[ncs->limchan] );
}
static void do_simple_spillmap_red_fac(bNode *node, float* out, float *in, float *fac)
{
- NodeColorspill *ncs;
- ncs=node->storage;
+ NodeColorspill *ncs;
+ ncs=node->storage;
- out[0] = *fac * (in[0]-( ncs->limscale * in[ncs->limchan]));
+ out[0] = *fac * (in[0]-( ncs->limscale * in[ncs->limchan]));
}
static void do_simple_spillmap_green(bNode *node, float* out, float *in)
@@ -73,10 +73,10 @@ static void do_simple_spillmap_green(bNode *node, float* out, float *in)
static void do_simple_spillmap_green_fac(bNode *node, float* out, float *in, float *fac)
{
- NodeColorspill *ncs;
- ncs=node->storage;
+ NodeColorspill *ncs;
+ ncs=node->storage;
- out[0] = *fac * (in[1]-( ncs->limscale * in[ncs->limchan]));
+ out[0] = *fac * (in[1]-( ncs->limscale * in[ncs->limchan]));
}
static void do_simple_spillmap_blue(bNode *node, float* out, float *in)
@@ -88,10 +88,10 @@ static void do_simple_spillmap_blue(bNode *node, float* out, float *in)
static void do_simple_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac)
{
- NodeColorspill *ncs;
- ncs=node->storage;
+ NodeColorspill *ncs;
+ ncs=node->storage;
- out[0] = *fac * (in[2]-( ncs->limscale * in[ncs->limchan]));
+ out[0] = *fac * (in[2]-( ncs->limscale * in[ncs->limchan]));
}
static void do_average_spillmap_red(bNode *node, float* out, float *in)
@@ -103,10 +103,10 @@ static void do_average_spillmap_red(bNode *node, float* out, float *in)
static void do_average_spillmap_red_fac(bNode *node, float* out, float *in, float *fac)
{
- NodeColorspill *ncs;
- ncs=node->storage;
+ NodeColorspill *ncs;
+ ncs=node->storage;
- out[0] = *fac * (in[0]-(ncs->limscale * avg(in[1], in[2]) ));
+ out[0] = *fac * (in[0]-(ncs->limscale * avg(in[1], in[2]) ));
}
static void do_average_spillmap_green(bNode *node, float* out, float *in)
@@ -118,10 +118,10 @@ static void do_average_spillmap_green(bNode *node, float* out, float *in)
static void do_average_spillmap_green_fac(bNode *node, float* out, float *in, float *fac)
{
- NodeColorspill *ncs;
- ncs=node->storage;
+ NodeColorspill *ncs;
+ ncs=node->storage;
- out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[2]) ));
+ out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[2]) ));
}
static void do_average_spillmap_blue(bNode *node, float* out, float *in)
@@ -133,10 +133,10 @@ static void do_average_spillmap_blue(bNode *node, float* out, float *in)
static void do_average_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac)
{
- NodeColorspill *ncs;
- ncs=node->storage;
+ NodeColorspill *ncs;
+ ncs=node->storage;
- out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[1]) ));
+ out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[1]) ));
}
static void do_apply_spillmap_red(bNode *node, float* out, float *in, float *map)
@@ -189,48 +189,47 @@ static void do_apply_spillmap_blue(bNode *node, float* out, float *in, float *ma
static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
{
- /*
- Originally based on the information from the book "The Art and Science of Digital Composition" and
- discussions from vfxtalk.com.*/
- CompBuf *cbuf;
- CompBuf *mask;
+ /* Originally based on the information from the book "The Art and Science of Digital Composition" and
+ * discussions from vfxtalk.com .*/
+ CompBuf *cbuf;
+ CompBuf *mask;
CompBuf *rgbbuf;
CompBuf *spillmap;
NodeColorspill *ncs;
ncs=node->storage;
- /* early out for missing connections */
- if(out[0]->hasoutput==0 ) return;
- if(in[0]->hasinput==0) return;
- if(in[0]->data==NULL) return;
+ /* early out for missing connections */
+ if(out[0]->hasoutput==0 ) return;
+ if(in[0]->hasinput==0) return;
+ if(in[0]->data==NULL) return;
- cbuf=typecheck_compbuf(in[0]->data, CB_RGBA);
- mask=typecheck_compbuf(in[1]->data, CB_VAL);
+ cbuf=typecheck_compbuf(in[0]->data, CB_RGBA);
+ mask=typecheck_compbuf(in[1]->data, CB_VAL);
spillmap=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1);
rgbbuf=dupalloc_compbuf(cbuf);
switch(node->custom1)
{
- case 1: /*red spill*/
+ case 1: /*red spill*/
{
switch(node->custom2)
{
- case 0: /* simple limit */
- {
- if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
- composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_red, CB_RGBA);
- } else {
- composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_red_fac, CB_RGBA, CB_VAL);
- }
+ case 0: /* simple limit */
+ {
+ if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
+ composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_red, CB_RGBA);
+ } else {
+ composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_red_fac, CB_RGBA, CB_VAL);
+ }
break;
}
- case 1: /* average limit */
- {
- if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
- composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_red, CB_RGBA);
- } else {
- composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_red_fac, CB_RGBA, CB_VAL);
- }
+ case 1: /* average limit */
+ {
+ if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
+ composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_red, CB_RGBA);
+ } else {
+ composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_red_fac, CB_RGBA, CB_VAL);
+ }
break;
}
}
@@ -242,59 +241,59 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
composit2_pixel_processor(node, rgbbuf, cbuf, in[0]->vec, spillmap, NULL, do_apply_spillmap_red, CB_RGBA, CB_VAL);
break;
}
- case 2: /*green spill*/
+ case 2: /*green spill*/
{
switch(node->custom2)
{
- case 0: /* simple limit */
- {
- if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
- composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_green, CB_RGBA);
- } else {
- composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_green_fac, CB_RGBA, CB_VAL);
- }
- break;
- }
- case 1: /* average limit */
- {
- if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
- composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_green, CB_RGBA);
- } else {
- composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_green_fac, CB_RGBA, CB_VAL);
- }
- break;
- }
+ case 0: /* simple limit */
+ {
+ if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
+ composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_green, CB_RGBA);
+ } else {
+ composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_green_fac, CB_RGBA, CB_VAL);
+ }
+ break;
+ }
+ case 1: /* average limit */
+ {
+ if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
+ composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_green, CB_RGBA);
+ } else {
+ composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_green_fac, CB_RGBA, CB_VAL);
+ }
+ break;
+ }
}
if(ncs->unspill==0) {
ncs->uspillr=0.0f;
ncs->uspillg=1.0f;
ncs->uspillb=0.0f;
- }
+ }
composit2_pixel_processor(node, rgbbuf, cbuf, in[0]->vec, spillmap, NULL, do_apply_spillmap_green, CB_RGBA, CB_VAL);
break;
}
- case 3: /*blue spill*/
+ case 3: /*blue spill*/
{
switch(node->custom2)
{
- case 0: /* simple limit */
- {
- if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
- composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_blue, CB_RGBA);
- } else {
- composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_blue_fac, CB_RGBA, CB_VAL);
- }
- break;
- }
- case 1: /* average limit */
- {
- if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
- composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_blue, CB_RGBA);
- } else {
- composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_blue_fac, CB_RGBA, CB_VAL);
- }
- break;
- }
+ case 0: /* simple limit */
+ {
+ if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
+ composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_blue, CB_RGBA);
+ } else {
+ composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_blue_fac, CB_RGBA, CB_VAL);
+ }
+ break;
+ }
+ case 1: /* average limit */
+ {
+ if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
+ composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_blue, CB_RGBA);
+ } else {
+ composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_blue_fac, CB_RGBA, CB_VAL);
+ }
+ break;
+ }
}
if(ncs->unspill==0) {
ncs->uspillr=0.0f;
@@ -304,27 +303,27 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
composit2_pixel_processor(node, rgbbuf, cbuf, in[0]->vec, spillmap, NULL, do_apply_spillmap_blue, CB_RGBA, CB_VAL);
break;
}
- default:
- break;
+ default:
+ break;
}
out[0]->data=rgbbuf;
if(cbuf!=in[0]->data)
free_compbuf(cbuf);
-
- free_compbuf(spillmap);
+
+ free_compbuf(spillmap);
}
static void node_composit_init_color_spill(bNode *node)
{
- NodeColorspill *ncs= MEM_callocN(sizeof(NodeColorspill), "node colorspill");
- node->storage=ncs;
- node->custom1= 2; /* green channel */
- node->custom2= 0; /* simple limit algo*/
- ncs->limchan= 0; /* limit by red */
- ncs->limscale= 1.0f; /* limit scaling factor */
- ncs->unspill=0; /* do not use unspill */
+ NodeColorspill *ncs= MEM_callocN(sizeof(NodeColorspill), "node colorspill");
+ node->storage=ncs;
+ node->custom1= 2; /* green channel */
+ node->custom2= 0; /* simple limit algo*/
+ ncs->limchan= 0; /* limit by red */
+ ncs->limscale= 1.0f; /* limit scaling factor */
+ ncs->unspill=0; /* do not use unspill */
}
void register_node_type_cmp_color_spill(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_crop.c b/source/blender/nodes/intern/CMP_nodes/CMP_crop.c
index 08913575fcf..0331217f0cb 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_crop.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_crop.c
@@ -105,12 +105,12 @@ static void node_composit_exec_crop(void *UNUSED(data), bNode *node, bNodeStack
static void node_composit_init_crop(bNode* node)
{
- NodeTwoXYs *nxy= MEM_callocN(sizeof(NodeTwoXYs), "node xy data");
- node->storage= nxy;
- nxy->x1= 0;
- nxy->x2= 0;
- nxy->y1= 0;
- nxy->y2= 0;
+ NodeTwoXYs *nxy= MEM_callocN(sizeof(NodeTwoXYs), "node xy data");
+ node->storage= nxy;
+ nxy->x1= 0;
+ nxy->x2= 0;
+ nxy->y1= 0;
+ nxy->y2= 0;
}
void register_node_type_cmp_crop(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c b/source/blender/nodes/intern/CMP_nodes/CMP_curves.c
index f0b399ae1e8..921c5e21fea 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_curves.c
@@ -59,9 +59,9 @@ static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack *
static void node_composit_init_curves_time(bNode* node)
{
- node->custom1= 1;
- node->custom2= 250;
- node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+ node->custom1= 1;
+ node->custom2= 250;
+ node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
}
void register_node_type_cmp_curve_time(ListBase *lb)
@@ -102,7 +102,7 @@ static void node_composit_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeS
static void node_composit_init_curve_vec(bNode* node)
{
- node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f);
+ node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f);
}
void register_node_type_cmp_curve_vec(ListBase *lb)
@@ -189,7 +189,7 @@ static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeS
static void node_composit_init_curve_rgb(bNode* node)
{
- node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
+ node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
}
void register_node_type_cmp_curve_rgb(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
index 303d5ee01aa..f249e2cff6c 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
@@ -859,19 +859,19 @@ static void node_composit_exec_defocus(void *UNUSED(data), bNode *node, bNodeSta
static void node_composit_init_defocus(bNode* node)
{
- /* qdn: defocus node */
- NodeDefocus *nbd = MEM_callocN(sizeof(NodeDefocus), "node defocus data");
- nbd->bktype = 0;
- nbd->rotation = 0.f;
- nbd->preview = 1;
- nbd->gamco = 0;
- nbd->samples = 16;
- nbd->fstop = 128.f;
- nbd->maxblur = 0;
- nbd->bthresh = 1.f;
- nbd->scale = 1.f;
- nbd->no_zbuf = 1;
- node->storage = nbd;
+ /* qdn: defocus node */
+ NodeDefocus *nbd = MEM_callocN(sizeof(NodeDefocus), "node defocus data");
+ nbd->bktype = 0;
+ nbd->rotation = 0.f;
+ nbd->preview = 1;
+ nbd->gamco = 0;
+ nbd->samples = 16;
+ nbd->fstop = 128.f;
+ nbd->maxblur = 0;
+ nbd->bthresh = 1.f;
+ nbd->scale = 1.f;
+ nbd->no_zbuf = 1;
+ node->storage = nbd;
}
void register_node_type_cmp_defocus(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
index f0e112761e3..296053298da 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
@@ -51,35 +51,35 @@ static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float *
{
NodeChroma *c= (NodeChroma *)node->storage;
float tolerence=c->t1;
- float falloff=c->t2;
+ float falloff=c->t2;
float difference;
- float alpha;
-
- difference=fabs(inColor2[0]-inColor1[0])+
+ float alpha;
+
+ difference= fabs(inColor2[0]-inColor1[0])+
fabs(inColor2[1]-inColor1[1])+
fabs(inColor2[2]-inColor1[2]);
- /*average together the distances*/
- difference=difference/3.0;
+ /*average together the distances*/
+ difference=difference/3.0;
- VECCOPY(outColor, inColor1);
+ VECCOPY(outColor, inColor1);
- /*make 100% transparent*/
- if(difference < tolerence){
- outColor[3]=0.0;
+ /*make 100% transparent*/
+ if(difference < tolerence) {
+ 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];
+ }
}
- /*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];
- }
- }
else {
/*foreground object*/
outColor[3]= inColor1[3];
@@ -90,29 +90,29 @@ static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **
{
CompBuf *outbuf=0;
CompBuf *imbuf1=0;
- CompBuf *imbuf2=0;
+ CompBuf *imbuf2=0;
NodeChroma *c;
-
+
/*is anything connected?*/
if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return;
/*must have an image imput*/
if(in[0]->data==NULL) return;
-
+
imbuf1=typecheck_compbuf(in[0]->data, CB_RGBA);
- /* if there's an image, use that, if not use the color */
- if(in[1]->data) {
- imbuf2=typecheck_compbuf(in[1]->data, CB_RGBA);
- }
-
+ /* if there's an image, use that, if not use the color */
+ if(in[1]->data) {
+ imbuf2=typecheck_compbuf(in[1]->data, CB_RGBA);
+ }
+
c=node->storage;
outbuf=dupalloc_compbuf(imbuf1);
-
+
/* note, processor gets a keyvals array passed on as buffer constant */
composit2_pixel_processor(node, outbuf, imbuf1, in[0]->vec, imbuf2, in[1]->vec, do_diff_matte, CB_RGBA, CB_RGBA);
-
+
out[0]->data=outbuf;
if(out[1]->hasoutput)
out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A);
@@ -127,10 +127,10 @@ static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **
static void node_composit_init_diff_matte(bNode *node)
{
- NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
- node->storage= c;
- c->t1= 0.1f;
- c->t2= 0.1f;
+ NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
+ node->storage= c;
+ c->t1= 0.1f;
+ c->t2= 0.1f;
}
void register_node_type_cmp_diff_matte(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
index 2694c0559d7..5f7613464c1 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
@@ -53,35 +53,35 @@ static void do_distance_matte(bNode *node, float *out, float *in)
{
NodeChroma *c= (NodeChroma *)node->storage;
float tolerence=c->t1;
- float falloff=c->t2;
+ float falloff=c->t2;
float distance;
- float alpha;
-
- distance=sqrt((c->key[0]-in[0])*(c->key[0]-in[0]) +
+ 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]));
- VECCOPY(out, in);
-
- /*make 100% transparent */
- if(distance < tolerence) {
- 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];
- }
- }
- else {
- out[3]=in[3];
- }
+ VECCOPY(out, in);
+
+ /*make 100% transparent */
+ if(distance < tolerence) {
+ 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];
+ }
+ }
+ else {
+ out[3]=in[3];
+ }
}
static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
@@ -124,10 +124,10 @@ static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStac
static void node_composit_init_distance_matte(bNode *node)
{
- NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
- node->storage= c;
- c->t1= 0.1f;
- c->t2= 0.1f;
+ NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
+ node->storage= c;
+ c->t1= 0.1f;
+ c->t2= 0.1f;
}
void register_node_type_cmp_distance_matte(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c b/source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c
index 238f9b063c2..7b5511c699c 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c
@@ -97,11 +97,11 @@ static void node_composit_exec_hue_sat(void *UNUSED(data), bNode *node, bNodeSta
static void node_composit_init_hue_sat(bNode* node)
{
- NodeHueSat *nhs= MEM_callocN(sizeof(NodeHueSat), "node hue sat");
- node->storage= nhs;
- nhs->hue= 0.5f;
- nhs->sat= 1.0f;
- nhs->val= 1.0f;
+ NodeHueSat *nhs= MEM_callocN(sizeof(NodeHueSat), "node hue sat");
+ node->storage= nhs;
+ nhs->hue= 0.5f;
+ nhs->sat= 1.0f;
+ nhs->val= 1.0f;
}
void register_node_type_cmp_hue_sat(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
index 1ea3cf96ad0..3caaad26bae 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
@@ -294,12 +294,12 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSE
static void node_composit_init_image(bNode* node)
{
- ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
- node->storage= iuser;
- iuser->frames= 1;
- iuser->sfra= 1;
- iuser->fie_ima= 2;
- iuser->ok= 1;
+ ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
+ node->storage= iuser;
+ iuser->frames= 1;
+ iuser->sfra= 1;
+ iuser->fie_ima= 2;
+ iuser->ok= 1;
}
void register_node_type_cmp_image(ListBase *lb)
@@ -321,27 +321,27 @@ void register_node_type_cmp_image(ListBase *lb)
static CompBuf *compbuf_from_pass(RenderData *rd, RenderLayer *rl, int rectx, int recty, int passcode)
{
- 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;
- }
- return NULL;
+ 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;
+ }
+ return NULL;
}
static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStack **out, int rectx, int recty)
@@ -383,51 +383,51 @@ static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStac
static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
{
- Scene *sce= (Scene *)node->id;
- Render *re= (sce)? RE_GetRender(sce->id.name): NULL;
- RenderData *rd= data;
- RenderResult *rr= NULL;
-
- if(re)
- 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;
+ Scene *sce= (Scene *)node->id;
+ Render *re= (sce)? RE_GetRender(sce->id.name): NULL;
+ RenderData *rd= data;
+ RenderResult *rr= NULL;
+
+ if(re)
+ 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;
+ /* 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);
+ 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);
+ node_composit_rlayers_out(rd, rl, out, rr->rectx, rr->recty);
- generate_preview(data, node, stackbuf);
+ generate_preview(data, node, stackbuf);
+ }
}
- }
- }
- }
+ }
+ }
- if(re)
- RE_ReleaseResult(re);
+ if(re)
+ RE_ReleaseResult(re);
}
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_invert.c b/source/blender/nodes/intern/CMP_nodes/CMP_invert.c
index f42bcb576fd..27b0324dfe0 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_invert.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_invert.c
@@ -116,7 +116,7 @@ static void node_composit_exec_invert(void *UNUSED(data), bNode *node, bNodeStac
static void node_composit_init_invert(bNode *node)
{
- node->custom1 |= CMP_CHAN_RGB;
+ node->custom1 |= CMP_CHAN_RGB;
}
/* custom1 = mix type */
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c b/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
index 4436be14b5c..2c9f7d97f09 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
@@ -330,7 +330,7 @@ static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack *
static void node_composit_init_view_levels(bNode* node)
{
- node->custom1=1; /*All channels*/
+ node->custom1=1; /*All channels*/
}
void register_node_type_cmp_view_levels(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
index 7ed38996cf8..34e58791932 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
@@ -102,10 +102,10 @@ static void node_composit_exec_luma_matte(void *data, bNode *node, bNodeStack **
static void node_composit_init_luma_matte(bNode *node)
{
- NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
- node->storage=c;
- c->t1= 1.0f;
- c->t2= 0.0f;
+ NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
+ node->storage=c;
+ c->t1= 1.0f;
+ c->t2= 0.0f;
}
void register_node_type_cmp_luma_matte(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c b/source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c
index b4af253ac3a..f14e0fbd804 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c
@@ -81,7 +81,7 @@ static void node_composit_exec_map_value(void *UNUSED(data), bNode *node, bNodeS
static void node_composit_init_map_value(bNode* node)
{
- node->storage= add_mapping();
+ node->storage= add_mapping();
}
void register_node_type_cmp_map_value(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
index 653e3f4211b..87c4ed1dac0 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
@@ -129,46 +129,46 @@ static bNodeSocketType cmp_node_combhsva_out[]= {
static void do_comb_hsva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
{
- float r,g,b;
- hsv_to_rgb(in1[0], in2[0], in3[0], &r, &g, &b);
+ float r,g,b;
+ hsv_to_rgb(in1[0], in2[0], in3[0], &r, &g, &b);
- out[0] = r;
- out[1] = g;
- out[2] = b;
- out[3] = in4[0];
+ out[0] = r;
+ out[1] = g;
+ out[2] = b;
+ out[3] = in4[0];
}
static void node_composit_exec_combhsva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
{
- /* stack order out: 1 rgba channels */
- /* stack order in: 4 value channels */
-
- /* 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];
- }
- else {
- /* 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;
-
- 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);
-
- out[0]->data= stackbuf;
- }
+ /* stack order out: 1 rgba channels */
+ /* stack order in: 4 value channels */
+
+ /* 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];
+ }
+ else {
+ /* 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;
+
+ 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);
+
+ out[0]->data= stackbuf;
+ }
}
void register_node_type_cmp_combhsva(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c b/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
index 69499f25b39..13cb3bcfed5 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
@@ -143,12 +143,12 @@ static void node_composit_exec_splitviewer(void *data, bNode *node, bNodeStack *
static void node_composit_init_splitviewer(bNode* node)
{
- ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
- node->storage= iuser;
- iuser->sfra= 1;
- iuser->fie_ima= 2;
- iuser->ok= 1;
- node->custom1= 50; /* default 50% split */
+ ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
+ node->storage= iuser;
+ iuser->sfra= 1;
+ iuser->fie_ima= 2;
+ iuser->ok= 1;
+ node->custom1= 50; /* default 50% split */
}
void register_node_type_cmp_splitviewer(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c b/source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c
index fa6b5db89f6..1e1c8c61b46 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c
@@ -82,7 +82,7 @@ static void node_composit_exec_valtorgb(void *UNUSED(data), bNode *node, bNodeSt
static void node_composit_init_valtorgb(bNode* node)
{
- node->storage= add_colorband(1);
+ node->storage= add_colorband(1);
}
void register_node_type_cmp_valtorgb(ListBase *lb)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c b/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c
index b21418f6698..c43bfa2435a 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c
@@ -89,10 +89,10 @@ static void node_composit_exec_vecblur(void *UNUSED(data), bNode *node, bNodeSta
static void node_composit_init_vecblur(bNode* node)
{
- NodeBlurData *nbd= MEM_callocN(sizeof(NodeBlurData), "node blur data");
- node->storage= nbd;
- nbd->samples= 32;
- nbd->fac= 1.0f;
+ NodeBlurData *nbd= MEM_callocN(sizeof(NodeBlurData), "node blur data");
+ node->storage= nbd;
+ nbd->samples= 32;
+ nbd->fac= 1.0f;
}
/* custom1: itterations, custom2: maxspeed (0 = nolimit) */
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c b/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c
index b3629eb1e16..c4e719efbf9 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c
@@ -126,11 +126,11 @@ static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in,
static void node_composit_init_viewer(bNode* node)
{
- ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
- node->storage= iuser;
- iuser->sfra= 1;
- iuser->fie_ima= 2;
- iuser->ok= 1;
+ ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
+ node->storage= iuser;
+ iuser->sfra= 1;
+ iuser->fie_ima= 2;
+ iuser->ok= 1;
}
void register_node_type_cmp_viewer(ListBase *lb)