diff options
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c | 86 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c | 174 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c | 38 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_value.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/Makefile | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_util.c | 14 | ||||
-rw-r--r-- | source/blender/nodes/intern/Makefile | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/Makefile | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/SHD_value.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/TEX_nodes/Makefile | 2 |
12 files changed, 213 insertions, 115 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c index b081880b87b..e502129c3d3 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c @@ -44,20 +44,38 @@ static bNodeSocketType cmp_node_chroma_out[]={ static void do_rgba_to_ycca_normalized(bNode *node, float *out, float *in) { - /*normalize to the range -1.0 to 1.0) */ - rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); - out[0]=((out[0])-16)/255.0; - out[1]=((out[1])-128)/255.0; - out[2]=((out[2])-128)/255.0; + 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; + + //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; +// out[2]=((out[2])-128)/255.0; out[3]=in[3]; } static void do_ycca_to_rgba_normalized(bNode *node, float *out, float *in) { - /*un-normalize the normalize from above */ - in[0]=(in[0]*255.0)+16; - in[1]=(in[1]*255.0)+128; - in[2]=(in[2]*255.0)+128; + /*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)+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); out[3]=in[3]; } @@ -65,47 +83,41 @@ static void do_ycca_to_rgba_normalized(bNode *node, float *out, float *in) static void do_chroma_key(bNode *node, float *out, float *in) { NodeChroma *c; - float x, z, alpha; - float theta, beta, angle; - float kfg, newY, newCb, newCr; + float x, z, alpha; + float theta, beta, angle, angle2; + float kfg; c=node->storage; - /* Algorithm from book "Video Demistified" */ + /* Algorithm from book "Video Demistified," does not include the spill reduction part */ /* find theta, the angle that the color space should be rotated based on key*/ - theta=atan2(c->key[2],c->key[1]); + theta=atan2(c->key[2], c->key[1]); /*rotate the cb and cr into x/z space */ - x=in[1]*cos(theta)+in[2]*sin(theta); - z=in[2]*cos(theta)-in[1]*sin(theta); + x=in[1]*cos(theta)+in[2]*sin(theta); + z=in[2]*cos(theta)-in[1]*sin(theta); - /*if within the acceptance angle */ - angle=c->t1*M_PI/180.0; /* convert to radians */ + /*if within the acceptance angle */ + angle=c->t1*M_PI/180.0; /* convert to radians */ - /* if kfg is <0 then the pixel is outside of the key color */ - kfg=x-(fabs(z)/tan(angle/2.0)); + /* if kfg is <0 then the pixel is outside of the key color */ + kfg=x-(fabs(z)/tan(angle/2.0)); - if(kfg>0.0) { /* found a pixel that is within key color */ + out[0]=in[0]; + out[1]=in[1]; + out[2]=in[2]; - newY=in[0]-(1-c->t3)*kfg; - newCb=in[1]-kfg*cos((double)theta); - newCr=in[2]-kfg*sin((double)theta); - alpha=(kfg+c->fsize)*(c->fstrength); + if(kfg>0.0) { /* found a pixel that is within key color */ + alpha=(1.0-kfg)*(c->fstrength); - beta=atan2(newCr,newCb); - beta=beta*180.0/M_PI; /* convert to degrees for compare*/ - - /* if beta is within the clippin angle */ - if(fabs(beta)<(c->t2/2.0)) { - newCb=0.0; - newCr=0.0; - alpha=0.0; - } + beta=atan2(z,x); + angle2=c->t2*M_PI/180.0; - out[0]=newY; - out[1]=newCb; - out[2]=newCr; + /* if beta is within the cutoff angle */ + if(fabs(beta)<(angle2/2.0)) { + alpha=0.0; + } /* don't make something that was more transparent less transparent */ if (alpha<in[3]) { diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c index 54fb1e384c3..3191ad757a0 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c @@ -34,7 +34,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_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,""} }; @@ -50,6 +51,14 @@ static void do_simple_spillmap_red(bNode *node, float* out, float *in) 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; + + out[0] = *fac * (in[0]-( ncs->limscale * in[ncs->limchan])); +} + static void do_simple_spillmap_green(bNode *node, float* out, float *in) { NodeColorspill *ncs; @@ -57,6 +66,14 @@ static void do_simple_spillmap_green(bNode *node, float* out, float *in) out[0]=in[1]-( ncs->limscale * in[ncs->limchan] ); } +static void do_simple_spillmap_green_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[1]-( ncs->limscale * in[ncs->limchan])); +} + static void do_simple_spillmap_blue(bNode *node, float* out, float *in) { NodeColorspill *ncs; @@ -64,6 +81,14 @@ static void do_simple_spillmap_blue(bNode *node, float* out, float *in) out[0]=in[2]-( ncs->limscale * in[ncs->limchan] ); } +static void do_simple_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[2]-( ncs->limscale * in[ncs->limchan])); +} + static void do_average_spillmap_red(bNode *node, float* out, float *in) { NodeColorspill *ncs; @@ -71,6 +96,14 @@ static void do_average_spillmap_red(bNode *node, float* out, float *in) out[0]=in[0]-(ncs->limscale * avg(in[1], in[2]) ); } +static void do_average_spillmap_red_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[0]-(ncs->limscale * avg(in[1], in[2]) )); +} + static void do_average_spillmap_green(bNode *node, float* out, float *in) { NodeColorspill *ncs; @@ -78,6 +111,14 @@ static void do_average_spillmap_green(bNode *node, float* out, float *in) out[0]=in[1]-(ncs->limscale * avg(in[0], in[2]) ); } +static void do_average_spillmap_green_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[2]) )); +} + static void do_average_spillmap_blue(bNode *node, float* out, float *in) { NodeColorspill *ncs; @@ -85,6 +126,14 @@ static void do_average_spillmap_blue(bNode *node, float* out, float *in) out[0]=in[2]-(ncs->limscale * avg(in[0], in[1]) ); } +static void do_average_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + 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) { NodeColorspill *ncs; @@ -109,7 +158,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 +174,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]; @@ -138,16 +187,20 @@ static void node_composit_exec_color_spill(void *data, bNode *node, bNodeStack * /* Originally based on the information from the book "The Art and Science of Digital Composition" and discussions from vfxtalk.com.*/ - CompBuf *cbuf; + 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; - if(out[0]->hasoutput==0 || in[0]->hasinput==0) return; - if(in[0]->data==NULL) return; - - cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); + 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); @@ -157,14 +210,22 @@ static void node_composit_exec_color_spill(void *data, bNode *node, bNodeStack * { switch(node->custom2) { - case 0: /* simple limit */ - { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_red, CB_RGBA); + 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 */ - { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_red, CB_RGBA); + 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; } } @@ -180,22 +241,30 @@ static void node_composit_exec_color_spill(void *data, bNode *node, bNodeStack * { switch(node->custom2) { - case 0: /* simple limit */ - { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_green, CB_RGBA); - break; - } - case 1: /* average limit */ - { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_green, CB_RGBA); - 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; } @@ -203,16 +272,24 @@ static void node_composit_exec_color_spill(void *data, bNode *node, bNodeStack * { switch(node->custom2) { - case 0: /* simple limit */ - { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_blue, CB_RGBA); - break; - } - case 1: /* average limit */ - { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_blue, CB_RGBA); - 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; @@ -246,19 +323,18 @@ static void node_composit_init_color_spill(bNode *node) } bNodeType cmp_node_color_spill={ - /* *next,*prev */ NULL, NULL, - /* type code */ CMP_NODE_COLOR_SPILL, - /* name */ "Color Spill", - /* width+range */ 140, 80, 200, - /* class+opts */ NODE_CLASS_MATTE, NODE_OPTIONS, - /* input sock */ cmp_node_color_spill_in, - /* output sock */ cmp_node_color_spill_out, - /* storage */ "NodeColorspill", - /* execfunc */ node_composit_exec_color_spill, - /* butfunc */ NULL, - /* initfunc */ node_composit_init_color_spill, - /* freestoragefunc */ node_free_standard_storage, - /* copystoragefunc */ node_copy_standard_storage, - /* id */ NULL + /* *next,*prev */ NULL, NULL, + /* type code */ CMP_NODE_COLOR_SPILL, + /* name */ "Color Spill", + /* width+range */ 140, 80, 200, + /* class+opts */ NODE_CLASS_MATTE, NODE_OPTIONS, + /* input sock */ cmp_node_color_spill_in, + /* output sock */ cmp_node_color_spill_out, + /* storage */ "NodeColorspill", + /* execfunc */ node_composit_exec_color_spill, + /* butfunc */ NULL, + /* initfunc */ node_composit_init_color_spill, + /* freestoragefunc */ node_free_standard_storage, + /* copystoragefunc */ node_copy_standard_storage, }; diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c index efd49172f95..43c6c6d791e 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c @@ -54,15 +54,19 @@ DO_INLINE float colorbalance_cdl(float in, float offset, float power, float slop return powf(x, 1.f/power); } -/* note: lift_lgg is just 2-lift */ -DO_INLINE float colorbalance_lgg(float in, float lift_lgg, float gamma, float gain) -{ - float x= (((in - 1.0f) * lift_lgg) + 1.0f) * gain; +/* note: lift_lgg is just 2-lift, gamma_inv is 1.0/gamma */ +DO_INLINE float colorbalance_lgg(float in, float lift_lgg, float gamma_inv, float gain) +{ + /* 1:1 match with the sequencer with linear/srgb conversions, the conversion isnt pretty + * but best keep it this way, sice testing for durian shows a similar calculation + * without lin/srgb conversions gives bad results (over-saturated shadows) with colors + * slightly below 1.0. some correction can be done but it ends up looking bad for shadows or lighter tones - campbell */ + float x= (((linearrgb_to_srgb(in) - 1.0f) * lift_lgg) + 1.0f) * gain; /* prevent NaN */ if (x < 0.f) x = 0.f; - - return powf(x, (1.f/gamma)); + + return powf(srgb_to_linearrgb(x), gamma_inv); } static void do_colorbalance_cdl(bNode *node, float* out, float *in) @@ -90,9 +94,9 @@ static void do_colorbalance_lgg(bNode *node, float* out, float *in) { NodeColorBalance *n= (NodeColorBalance *)node->storage; - out[0] = colorbalance_lgg(in[0], n->lift_lgg[0], n->gamma[0], n->gain[0]); - out[1] = colorbalance_lgg(in[1], n->lift_lgg[1], n->gamma[1], n->gain[1]); - out[2] = colorbalance_lgg(in[2], n->lift_lgg[2], n->gamma[2], n->gain[2]); + out[0] = colorbalance_lgg(in[0], n->lift_lgg[0], n->gamma_inv[0], n->gain[0]); + out[1] = colorbalance_lgg(in[1], n->lift_lgg[1], n->gamma_inv[1], n->gain[1]); + out[2] = colorbalance_lgg(in[2], n->lift_lgg[2], n->gamma_inv[2], n->gain[2]); out[3] = in[3]; } @@ -101,9 +105,9 @@ static void do_colorbalance_lgg_fac(bNode *node, float* out, float *in, float *f NodeColorBalance *n= (NodeColorBalance *)node->storage; const float mfac= 1.0f - *fac; - out[0] = mfac*in[0] + *fac * colorbalance_lgg(in[0], n->lift_lgg[0], n->gamma[0], n->gain[0]); - out[1] = mfac*in[1] + *fac * colorbalance_lgg(in[1], n->lift_lgg[1], n->gamma[1], n->gain[1]); - out[2] = mfac*in[2] + *fac * colorbalance_lgg(in[2], n->lift_lgg[2], n->gamma[2], n->gain[2]); + out[0] = mfac*in[0] + *fac * colorbalance_lgg(in[0], n->lift_lgg[0], n->gamma_inv[0], n->gain[0]); + out[1] = mfac*in[1] + *fac * colorbalance_lgg(in[1], n->lift_lgg[1], n->gamma_inv[1], n->gain[1]); + out[2] = mfac*in[2] + *fac * colorbalance_lgg(in[2], n->lift_lgg[2], n->gamma_inv[2], n->gain[2]); out[3] = in[3]; } @@ -125,15 +129,9 @@ static void node_composit_exec_colorbalance(void *data, bNode *node, bNodeStack NodeColorBalance *n= (NodeColorBalance *)node->storage; int c; - copy_v3_v3(n->lift_lgg, n->lift); - for (c = 0; c < 3; c++) { - /* tweak to give more subtle results - * values above 1.0 are scaled */ - if(n->lift_lgg[c] > 1.0f) - n->lift_lgg[c] = pow(n->lift_lgg[c] - 1.0f, 2.0f) + 1.0f; - - n->lift_lgg[c] = 2.0f - n->lift_lgg[c]; + n->lift_lgg[c] = 2.0f - n->lift[c]; + n->gamma_inv[c] = (n->gamma[c] != 0.0f) ? 1.0f/n->gamma[c] : 1000000.0f; } } diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c b/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c index 95db66d92f7..9eb79bb8c36 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c @@ -141,7 +141,7 @@ static void node_composit_init_huecorrect(bNode* node) for (c=0; c<3; c++) { CurveMap *cuma = &cumapping->cm[c]; - curvemap_reset(cuma, &cumapping->clipr, cumapping->preset); + curvemap_reset(cuma, &cumapping->clipr, cumapping->preset, CURVEMAP_SLOPE_POSITIVE); } /* default to showing Saturation */ diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c index d80dd9b0a4b..0ac47c58ab3 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c @@ -64,7 +64,7 @@ static void node_composit_exec_sephsva(void *data, bNode *node, bNodeStack **in, if(in[0]->data==NULL) { float h, s, v; - rgb_to_hsv(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &h, &s, &v); + rgb_to_hsv(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &h, &s, &v); out[0]->vec[0] = h; out[1]->vec[0] = s; diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_value.c b/source/blender/nodes/intern/CMP_nodes/CMP_value.c index 576fb37dc45..14a3b6fe15c 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_value.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_value.c @@ -31,7 +31,7 @@ /* **************** VALUE ******************** */ static bNodeSocketType cmp_node_value_out[]= { - { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f}, { -1, 0, "" } }; diff --git a/source/blender/nodes/intern/CMP_nodes/Makefile b/source/blender/nodes/intern/CMP_nodes/Makefile index 5e8753570af..5e97864fb95 100644 --- a/source/blender/nodes/intern/CMP_nodes/Makefile +++ b/source/blender/nodes/intern/CMP_nodes/Makefile @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. # All rights reserved. diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/intern/CMP_util.c index f3e00cb37f8..bcb038bccc3 100644 --- a/source/blender/nodes/intern/CMP_util.c +++ b/source/blender/nodes/intern/CMP_util.c @@ -1125,7 +1125,19 @@ void convolve(CompBuf* dst, CompBuf* in1, CompBuf* in2) // sets fcol to pixelcolor at (x, y) void qd_getPixel(CompBuf* src, int x, int y, float* col) { - if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { + if(src->rect_procedural) { + float bc[4]; + src->rect_procedural(src, bc, (float)x/(float)src->xrad, (float)y/(float)src->yrad); + + switch(src->type){ + /* these fallthrough to get all the channels */ + case CB_RGBA: col[3]=bc[3]; + case CB_VEC3: col[2]=bc[2]; + case CB_VEC2: col[1]=bc[1]; + case CB_VAL: col[0]=bc[0]; + } + } + else if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { float* bc = &src->rect[(x + y*src->x)*src->type]; switch(src->type){ /* these fallthrough to get all the channels */ diff --git a/source/blender/nodes/intern/Makefile b/source/blender/nodes/intern/Makefile index 08f4b936c76..1ffc09bce2c 100644 --- a/source/blender/nodes/intern/Makefile +++ b/source/blender/nodes/intern/Makefile @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. # All rights reserved. diff --git a/source/blender/nodes/intern/SHD_nodes/Makefile b/source/blender/nodes/intern/SHD_nodes/Makefile index b6b21d5f5f8..666ffd4a7d3 100644 --- a/source/blender/nodes/intern/SHD_nodes/Makefile +++ b/source/blender/nodes/intern/SHD_nodes/Makefile @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. # All rights reserved. diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_value.c b/source/blender/nodes/intern/SHD_nodes/SHD_value.c index 77e0ec3bba3..1663ea352aa 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_value.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_value.c @@ -31,7 +31,7 @@ /* **************** VALUE ******************** */ static bNodeSocketType sh_node_value_out[]= { - { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f}, + { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f}, { -1, 0, "" } }; diff --git a/source/blender/nodes/intern/TEX_nodes/Makefile b/source/blender/nodes/intern/TEX_nodes/Makefile index f42660bd562..74eabe7932a 100644 --- a/source/blender/nodes/intern/TEX_nodes/Makefile +++ b/source/blender/nodes/intern/TEX_nodes/Makefile @@ -18,7 +18,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. # All rights reserved. |