replace macros with bli math functions for nodes
authorCampbell Barton <ideasman42@gmail.com>
Sun, 6 Nov 2011 16:23:28 +0000 (16:23 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 6 Nov 2011 16:23:28 +0000 (16:23 +0000)
35 files changed:
source/blender/nodes/composite/node_composite_util.c
source/blender/nodes/composite/nodes/node_composite_alphaOver.c
source/blender/nodes/composite/nodes/node_composite_blur.c
source/blender/nodes/composite/nodes/node_composite_colorMatte.c
source/blender/nodes/composite/nodes/node_composite_curves.c
source/blender/nodes/composite/nodes/node_composite_diffMatte.c
source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
source/blender/nodes/composite/nodes/node_composite_filter.c
source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
source/blender/nodes/composite/nodes/node_composite_invert.c
source/blender/nodes/composite/nodes/node_composite_mixrgb.c
source/blender/nodes/composite/nodes/node_composite_normal.c
source/blender/nodes/composite/nodes/node_composite_normalize.c
source/blender/nodes/composite/nodes/node_composite_rgb.c
source/blender/nodes/composite/nodes/node_composite_splitViewer.c
source/blender/nodes/composite/nodes/node_composite_texture.c
source/blender/nodes/composite/nodes/node_composite_zcombine.c
source/blender/nodes/shader/node_shader_util.c
source/blender/nodes/shader/nodes/node_shader_camera.c
source/blender/nodes/shader/nodes/node_shader_geom.c
source/blender/nodes/shader/nodes/node_shader_hueSatVal.c
source/blender/nodes/shader/nodes/node_shader_invert.c
source/blender/nodes/shader/nodes/node_shader_material.c
source/blender/nodes/shader/nodes/node_shader_mixRgb.c
source/blender/nodes/shader/nodes/node_shader_normal.c
source/blender/nodes/shader/nodes/node_shader_output.c
source/blender/nodes/shader/nodes/node_shader_rgb.c
source/blender/nodes/shader/nodes/node_shader_texture.c
source/blender/nodes/texture/nodes/node_texture_bricks.c
source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
source/blender/nodes/texture/nodes/node_texture_image.c
source/blender/nodes/texture/nodes/node_texture_invert.c
source/blender/nodes/texture/nodes/node_texture_mixRgb.c
source/blender/nodes/texture/nodes/node_texture_proc.c
source/blender/nodes/texture/nodes/node_texture_texture.c

index 929b87618d8143c7e9a4908bd57d5f5168c23d86..0356ed394f1ff8d27856f0dfe7584b62f7587080 100644 (file)
@@ -317,8 +317,8 @@ CompBuf *typecheck_compbuf(CompBuf *inbuf, int type)
 
                if(inbuf->rect_procedural) {
                        outbuf->rect_procedural= inbuf->rect_procedural;
-                       VECCOPY(outbuf->procedural_size, inbuf->procedural_size);
-                       VECCOPY(outbuf->procedural_offset, inbuf->procedural_offset);
+                       copy_v3_v3(outbuf->procedural_size, inbuf->procedural_size);
+                       copy_v3_v3(outbuf->procedural_offset, inbuf->procedural_offset);
                        outbuf->procedural_type= inbuf->procedural_type;
                        outbuf->node= inbuf->node;
                        return outbuf;
@@ -707,12 +707,12 @@ void do_ycca_to_rgba(bNode *UNUSED(node), float *out, float *in)
 
 void do_copy_rgba(bNode *UNUSED(node), float *out, float *in)
 {
-       QUATCOPY(out, in);
+       copy_v4_v4(out, in);
 }
 
 void do_copy_rgb(bNode *UNUSED(node), float *out, float *in)
 {
-       VECCOPY(out, in);
+       copy_v3_v3(out, in);
        out[3]= 1.0f;
 }
 
@@ -723,7 +723,7 @@ void do_copy_value(bNode *UNUSED(node), float *out, float *in)
 
 void do_copy_a_rgba(bNode *UNUSED(node), float *out, float *in, float *fac)
 {
-       VECCOPY(out, in);
+       copy_v3_v3(out, in);
        out[3]= *fac;
 }
 
index b542954948ae83ab4133e8f687382b7457885405..4fd4b7501782c5396150dcb9a91c49b15b8e30c6 100644 (file)
@@ -48,10 +48,10 @@ static void do_alphaover_premul(bNode *UNUSED(node), float *out, float *src, flo
 {
        
        if(over[3]<=0.0f) {
-               QUATCOPY(out, src);
+               copy_v4_v4(out, src);
        }
        else if(fac[0]==1.0f && over[3]>=1.0f) {
-               QUATCOPY(out, over);
+               copy_v4_v4(out, over);
        }
        else {
                float mul= 1.0f - fac[0]*over[3];
@@ -68,10 +68,10 @@ static void do_alphaover_key(bNode *UNUSED(node), float *out, float *src, float
 {
        
        if(over[3]<=0.0f) {
-               QUATCOPY(out, src);
+               copy_v4_v4(out, src);
        }
        else if(fac[0]==1.0f && over[3]>=1.0f) {
-               QUATCOPY(out, over);
+               copy_v4_v4(out, over);
        }
        else {
                float premul= fac[0]*over[3];
@@ -89,10 +89,10 @@ static void do_alphaover_mixed(bNode *node, float *out, float *src, float *over,
 {
        
        if(over[3]<=0.0f) {
-               QUATCOPY(out, src);
+               copy_v4_v4(out, src);
        }
        else if(fac[0]==1.0f && over[3]>=1.0f) {
-               QUATCOPY(out, over);
+               copy_v4_v4(out, over);
        }
        else {
                NodeTwoFloats *ntf= node->storage;
index 188ac653506e972fe0d06d56a01b855889e98894..d0ddfb47f0898a427ccd8781ab2944c9c0c7e46d 100644 (file)
@@ -512,7 +512,7 @@ static void blur_with_reference(bNode *node, CompBuf *new, CompBuf *img, CompBuf
                                if(pix==1)
                                        dest[0]= src[0];
                                else
-                                       QUATCOPY(dest, src);
+                                       copy_v4_v4(dest, src);
                        }
                        else {
                                int minxr= x-refradx<0?-x:-refradx;
index 3dfc3a193a8c95312ab91beba35cbdead00696de..b226e562799718f808886ea7d65bac4d5402c250 100644 (file)
@@ -52,7 +52,7 @@ static void do_color_key(bNode *node, float *out, float *in)
        c=node->storage;
 
 
-       VECCOPY(out, in);
+       copy_v3_v3(out, in);
 
        if(
        /* do hue last because it needs to wrap, and does some more checks  */
index 7faf10138ad09287d091342dafab93b7e71de459..6f4d32f65731c7665448b549460829f4d3b6f02a 100644 (file)
@@ -144,7 +144,7 @@ static void do_curves_fac(bNode *node, float *out, float *in, float *fac)
        if(*fac>=1.0)
                curvemapping_evaluate_premulRGBF(node->storage, out, in);
        else if(*fac<=0.0) {
-               VECCOPY(out, in);
+               copy_v3_v3(out, in);
        }
        else {
                float col[4], mfac= 1.0f-*fac;
index c621d5240446e1ff200d0a8ac4008ebe44c67b75..17156ab3492d09062a87c9fea8aac3851686bdca 100644 (file)
@@ -60,7 +60,7 @@ static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float *
        /*average together the distances*/
        difference=difference/3.0;
 
-       VECCOPY(outColor, inColor1);
+       copy_v3_v3(outColor, inColor1);
 
        /*make 100% transparent*/
        if(difference < tolerence) {
index 401b143aac309cb8c2c34ca0cf43e8191baf9f08..27fe66cbe0da81bfc7a7592c041406caaa0ad8e7 100644 (file)
@@ -59,7 +59,7 @@ static void do_distance_matte(bNode *node, float *out, float *in)
                                  (c->key[1]-in[1])*(c->key[1]-in[1]) +
                                  (c->key[2]-in[2])*(c->key[2]-in[2]));
 
-       VECCOPY(out, in);
+       copy_v3_v3(out, in);
 
        /*make 100% transparent */
        if(distance < tolerence) {
index 071ee84377c848301945ec0267e57616280794a5..1a0c51fab530abd8602a2841d6c365b6555bc94e 100644 (file)
@@ -64,7 +64,7 @@ static void do_filter_edge(CompBuf *out, CompBuf *in, float *filter, float fac)
                fp= out->rect + pix*y*rowlen;
                
                if(pix==CB_RGBA) {
-                       QUATCOPY(fp, row2);
+                       copy_v4_v4(fp, row2);
                        fp+= pix;
                        
                        for(x=2; x<rowlen; x++) {
@@ -78,7 +78,7 @@ static void do_filter_edge(CompBuf *out, CompBuf *in, float *filter, float fac)
                                /* no alpha... will clear it completely */
                                fp++; row1++; row2++; row3++;
                        }
-                       QUATCOPY(fp, row2+4);
+                       copy_v4_v4(fp, row2+4);
                }
                else if(pix==CB_VAL) {
                        fp+= pix;
@@ -138,7 +138,7 @@ static void do_filter3(CompBuf *out, CompBuf *in, float *filter, float fac)
                        fp[1]= row2[3];
                }
                else if(pixlen==3) {
-                       VECCOPY(fp, row2);
+                       copy_v3_v3(fp, row2);
                        fp+= 3;
                        
                        for(x=2; x<rowlen; x++) {
@@ -147,10 +147,10 @@ static void do_filter3(CompBuf *out, CompBuf *in, float *filter, float fac)
                                        fp++; row1++; row2++; row3++;
                                }
                        }
-                       VECCOPY(fp, row2+3);
+                       copy_v3_v3(fp, row2+3);
                }
                else {
-                       QUATCOPY(fp, row2);
+                       copy_v4_v4(fp, row2);
                        fp+= 4;
                        
                        for(x=2; x<rowlen; x++) {
@@ -159,7 +159,7 @@ static void do_filter3(CompBuf *out, CompBuf *in, float *filter, float fac)
                                        fp++; row1++; row2++; row3++;
                                }
                        }
-                       QUATCOPY(fp, row2+4);
+                       copy_v4_v4(fp, row2+4);
                }
        }
 }
index c2304b37c0db4411291b840ddb82e157a4c1e112..3c73d07d96c01871019163f2c2bdc409d1baf3fb 100644 (file)
@@ -64,7 +64,7 @@ static void do_hue_sat_fac(bNode *node, float *out, float *in, float *fac)
                out[3]= in[3];
        }
        else {
-               QUATCOPY(out, in);
+               copy_v4_v4(out, in);
        }
 }
 
index c428e37bd35f756e9657f10d9d539a89face1e96..daf2ee0cbe7449f437a6b7efcf7a13595d8ef7ad 100644 (file)
@@ -50,7 +50,7 @@ static void do_invert(bNode *node, float *out, float *in)
                out[1] = 1.0f - in[1];
                out[2] = 1.0f - in[2];
        } else
-               VECCOPY(out, in);
+               copy_v3_v3(out, in);
                
        if(node->custom1 & CMP_CHAN_A)
                out[3] = 1.0f - in[3];
@@ -75,7 +75,7 @@ static void do_invert_fac(bNode *node, float *out, float *in, float *fac)
        if(node->custom1 & CMP_CHAN_A)
                col[3] = fac[0]*col[3] + (facm*in[3]);
        
-       QUATCOPY(out, col);
+       copy_v4_v4(out, col);
 }
 
 static void node_composit_exec_invert(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
index 0f5a2b61b87d8b2738fb397015a16ae06b7091a1..275d949da28b784ab42487b5b8e6375339a6b332 100644 (file)
@@ -47,12 +47,12 @@ static void do_mix_rgb(bNode *node, float *out, float *in1, float *in2, float *f
 {
        float col[3];
        
-       VECCOPY(col, in1);
+       copy_v3_v3(col, in1);
        if(node->custom2)
                ramp_blend(node->custom1, col, col+1, col+2, in2[3]*fac[0], in2);
        else
                ramp_blend(node->custom1, col, col+1, col+2, fac[0], in2);
-       VECCOPY(out, col);
+       copy_v3_v3(out, col);
        out[3]= in1[3];
 }
 
index 499f8ce300fc3b14e3c933a553ab305ab94f76ea..4c43871d8678bc5392d080cd085c214186064b9d 100644 (file)
@@ -64,7 +64,7 @@ static void node_composit_exec_normal(void *UNUSED(data), bNode *node, bNodeStac
        
        /* input no image? then only vector op */
        if(in[0]->data==NULL) {
-               VECCOPY(out[0]->vec, nor);
+               copy_v3_v3(out[0]->vec, nor);
                /* render normals point inside... the widget points outside */
                out[1]->vec[0]= -dot_v3v3(out[0]->vec, in[0]->vec);
        }
index 36206d82d0bbbd6ea23a864271f8147acc269b76..a6220fbd20d811ec1151a8df80e8b44377da1222 100644 (file)
@@ -69,7 +69,7 @@ static void node_composit_exec_normalize(void *UNUSED(data), bNode *node, bNodeS
 
        /* Input has no image buffer? Then pass the value */
        if(in[0]->data==NULL) {
-               QUATCOPY(out[0]->vec, in[0]->vec);
+               copy_v4_v4(out[0]->vec, in[0]->vec);
        }
        else {
                float min = 1.0f+BLENDER_ZMAX;
index a7c820ddce6b3a9f92a371989cba27df99b06c3c..12f073a816d0a6f654db2b5bd91d24cd8847ad8e 100644 (file)
@@ -55,7 +55,7 @@ static void node_composit_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack *
        bNodeSocket *sock= node->outputs.first;
        float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value;
        
-       QUATCOPY(out[0]->vec, col);
+       copy_v4_v4(out[0]->vec, col);
 }
 
 void register_node_type_cmp_rgb(ListBase *lb)
index 22f3dd3a7b00f5e97b5812a1fa8f4fa101bc4052..b63b42224e205aca684cb386589dfdd259fee6fc 100644 (file)
@@ -42,10 +42,10 @@ static bNodeSocketTemplate cmp_node_splitviewer_in[]= {
 static void do_copy_split_rgba(bNode *UNUSED(node), float *out, float *in1, float *in2, float *fac)
 {
        if(*fac==0.0f) {
-               QUATCOPY(out, in1);
+               copy_v4_v4(out, in1);
        }
        else {
-               QUATCOPY(out, in2);
+               copy_v4_v4(out, in2);
        }
 }
 
index 24d7b30f11d1efb3c4a726fa950ae46d696d5de5..2f54f27e481baccadbcbe7284527db675f5ac8d5 100644 (file)
@@ -80,7 +80,7 @@ static void texture_procedural(CompBuf *cbuf, float *out, float xco, float yco)
                else col[0]= col[1]= col[2]= col[3];
        }
        else { 
-               VECCOPY(col, nor);
+               copy_v3_v3(col, nor);
        }
        
        typecheck_compbuf_color(out, col, cbuf->type, cbuf->procedural_type);
@@ -101,8 +101,8 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
 
                prevbuf->rect_procedural= texture_procedural;
                prevbuf->node= node;
-               VECCOPY(prevbuf->procedural_offset, in[0]->vec);
-               VECCOPY(prevbuf->procedural_size, in[1]->vec);
+               copy_v3_v3(prevbuf->procedural_offset, in[0]->vec);
+               copy_v3_v3(prevbuf->procedural_size, in[1]->vec);
                prevbuf->procedural_type= CB_RGBA;
                composit1_pixel_processor(node, prevbuf, prevbuf, out[0]->vec, do_copy_rgba, CB_RGBA);
                
@@ -118,8 +118,8 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
                        
                        stackbuf->rect_procedural= texture_procedural;
                        stackbuf->node= node;
-                       VECCOPY(stackbuf->procedural_offset, in[0]->vec);
-                       VECCOPY(stackbuf->procedural_size, in[1]->vec);
+                       copy_v3_v3(stackbuf->procedural_offset, in[0]->vec);
+                       copy_v3_v3(stackbuf->procedural_size, in[1]->vec);
                        stackbuf->procedural_type= CB_VAL;
                        composit1_pixel_processor(node, stackbuf, stackbuf, out[0]->vec, do_copy_value, CB_VAL);
                        stackbuf->rect_procedural= NULL;
@@ -131,8 +131,8 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
                        
                        stackbuf->rect_procedural= texture_procedural;
                        stackbuf->node= node;
-                       VECCOPY(stackbuf->procedural_offset, in[0]->vec);
-                       VECCOPY(stackbuf->procedural_size, in[1]->vec);
+                       copy_v3_v3(stackbuf->procedural_offset, in[0]->vec);
+                       copy_v3_v3(stackbuf->procedural_size, in[1]->vec);
                        stackbuf->procedural_type= CB_RGBA;
                        composit1_pixel_processor(node, stackbuf, stackbuf, out[0]->vec, do_copy_rgba, CB_RGBA);
                        stackbuf->rect_procedural= NULL;
index 7aac35399607aefb5007f5fe5f75bc76202ab2d4..868c0d2b5f32e9092cfc9f85ac1b1cfca29f760c 100644 (file)
@@ -65,7 +65,7 @@ static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *
                }
                else {
                        // do combination based solely on z value
-                       QUATCOPY(out, src1);
+                       copy_v4_v4(out, src1);
                }
        }
        else {
@@ -80,7 +80,7 @@ static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *
                }
                else {
                        // do combination based solely on z value
-                       QUATCOPY(out, src1);
+                       copy_v4_v4(out, src1);
                }
                
                if(node->custom2)
index 1acb04c9b4134010bd171be1bf29e6fa79212ca6..0c86d8fd5e4006a4eba43e06f5cdcc0e20e6b2c6 100644 (file)
@@ -55,12 +55,12 @@ void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
                        in[2]= from[0];
                }
                else {
-                       VECCOPY(in, from);
+                       copy_v3_v3(in, from);
                }
        }
        else { /* type_in==SOCK_RGBA */
                if(ns->sockettype==SOCK_RGBA) {
-                       QUATCOPY(in, from);
+                       copy_v4_v4(in, from);
                }
                else if(ns->sockettype==SOCK_FLOAT) {
                        in[0]= from[0];
@@ -69,7 +69,7 @@ void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
                        in[3]= 1.0f;
                }
                else {
-                       VECCOPY(in, from);
+                       copy_v3_v3(in, from);
                        in[3]= 1.0f;
                }
        }
@@ -140,13 +140,13 @@ void nodeShaderSynchronizeID(bNode *node, int copyto)
                                if(copyto) {
                                        switch(a) {
                                                case MAT_IN_COLOR:
-                                                       VECCOPY(&ma->r, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
+                                                       copy_v3_v3(&ma->r, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
                                                case MAT_IN_SPEC:
-                                                       VECCOPY(&ma->specr, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
+                                                       copy_v3_v3(&ma->specr, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
                                                case MAT_IN_REFL:
                                                        ma->ref= ((bNodeSocketValueFloat*)sock->default_value)->value; break;
                                                case MAT_IN_MIR:
-                                                       VECCOPY(&ma->mirr, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
+                                                       copy_v3_v3(&ma->mirr, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
                                                case MAT_IN_AMB:
                                                        ma->amb= ((bNodeSocketValueFloat*)sock->default_value)->value; break;
                                                case MAT_IN_EMIT:
@@ -164,13 +164,13 @@ void nodeShaderSynchronizeID(bNode *node, int copyto)
                                else {
                                        switch(a) {
                                                case MAT_IN_COLOR:
-                                                       VECCOPY(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->r); break;
+                                                       copy_v3_v3(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->r); break;
                                                case MAT_IN_SPEC:
-                                                       VECCOPY(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->specr); break;
+                                                       copy_v3_v3(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->specr); break;
                                                case MAT_IN_REFL:
                                                        ((bNodeSocketValueFloat*)sock->default_value)->value= ma->ref; break;
                                                case MAT_IN_MIR:
-                                                       VECCOPY(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->mirr); break;
+                                                       copy_v3_v3(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->mirr); break;
                                                case MAT_IN_AMB:
                                                        ((bNodeSocketValueFloat*)sock->default_value)->value= ma->amb; break;
                                                case MAT_IN_EMIT:
@@ -196,7 +196,7 @@ void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns)
 {
        memset(gs, 0, sizeof(*gs));
        
-       QUATCOPY(gs->vec, ns->vec);
+       copy_v4_v4(gs->vec, ns->vec);
        gs->link= ns->data;
        
        if (type == SOCK_FLOAT)
index c7882a6e0e2682d61161a9acf681b415ecd72acb..02efbd63abaac6dac8faace4d000c0e3eb6364a4 100644 (file)
@@ -46,7 +46,7 @@ static void node_shader_exec_camera(void *data, bNode *UNUSED(node), bNodeStack
        if(data) {
                ShadeInput *shi= ((ShaderCallData *)data)->shi;  /* Data we need for shading. */
                
-               VECCOPY(out[0]->vec, shi->co);          /* get view vector */
+               copy_v3_v3(out[0]->vec, shi->co);               /* get view vector */
                out[1]->vec[0]= fabs(shi->co[2]);               /* get view z-depth */
                out[2]->vec[0]= normalize_v3(out[0]->vec);      /* get view distance */
        }
index dedc25092c1c3951212a4b2ded1b59dc1445ec91..5c4ba75ae6764cf4a088c25497cb943987edbbab 100644 (file)
@@ -90,7 +90,7 @@ static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **UNUSED(i
                                }
                        }
 
-                       VECCOPY(out[GEOM_OUT_VCOL]->vec, scol->col);
+                       copy_v3_v3(out[GEOM_OUT_VCOL]->vec, scol->col);
                        out[GEOM_OUT_VCOL]->vec[3]= 1.0f;
                }
                else
index 7fb31d80ffc0af0529633ade62b5a670c3494954..1207196381df2acdb7f83ea3285cc4c2637740f9 100644 (file)
@@ -65,7 +65,7 @@ static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float *hue, float *s
                out[2]= mfac*in[2] + *fac*col[2];
        }
        else {
-               QUATCOPY(out, in);
+               copy_v4_v4(out, in);
        }
 }
 
index 066ff14a87011c527e97e8632e875de7bfbe5c13..e3dacefbcf235f177d90cd2f6b0cc21d0283dd91 100644 (file)
@@ -64,7 +64,7 @@ bNodeStack **out)
                col[2] = in[0]->vec[0]*col[2] + (facm*in[1]->vec[2]);
        }
        
-       VECCOPY(out[0]->vec, col);
+       copy_v3_v3(out[0]->vec, col);
 }
 
 static int gpu_shader_invert(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
index f93928d8884505a84180ab93029642d52b3f3448..a74a2567844d92704cced8cc9e6b3db0bb603953 100644 (file)
@@ -148,13 +148,13 @@ static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in,
                
                /* write to outputs */
                if(node->custom1 & SH_NODE_MAT_DIFF) {
-                       VECCOPY(col, shrnode.combined);
+                       copy_v3_v3(col, shrnode.combined);
                        if(!(node->custom1 & SH_NODE_MAT_SPEC)) {
                                sub_v3_v3(col, shrnode.spec);
                        }
                }
                else if(node->custom1 & SH_NODE_MAT_SPEC) {
-                       VECCOPY(col, shrnode.spec);
+                       copy_v3_v3(col, shrnode.spec);
                }
                else
                        col[0]= col[1]= col[2]= 0.0f;
@@ -164,7 +164,7 @@ static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in,
                if(shi->do_preview)
                        nodeAddToPreview(node, col, shi->xs, shi->ys, shi->do_manage);
                
-               VECCOPY(out[MAT_OUT_COLOR]->vec, col);
+               copy_v3_v3(out[MAT_OUT_COLOR]->vec, col);
                out[MAT_OUT_ALPHA]->vec[0]= shrnode.alpha;
                
                if(node->custom1 & SH_NODE_MAT_NEG) {
@@ -173,15 +173,15 @@ static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in,
                        shi->vn[2]= -shi->vn[2];
                }
                
-               VECCOPY(out[MAT_OUT_NORMAL]->vec, shi->vn);
+               copy_v3_v3(out[MAT_OUT_NORMAL]->vec, shi->vn);
                
                /* Extended material options */
                if (node->type == SH_NODE_MATERIAL_EXT) {
                        /* Shadow, Reflect, Refract, Radiosity, Speed seem to cause problems inside
                         * a node tree :( */
-                       VECCOPY(out[MAT_OUT_DIFFUSE]->vec, shrnode.diff);
-                       VECCOPY(out[MAT_OUT_SPEC]->vec, shrnode.spec);
-                       VECCOPY(out[MAT_OUT_AO]->vec, shrnode.ao);
+                       copy_v3_v3(out[MAT_OUT_DIFFUSE]->vec, shrnode.diff);
+                       copy_v3_v3(out[MAT_OUT_SPEC]->vec, shrnode.spec);
+                       copy_v3_v3(out[MAT_OUT_AO]->vec, shrnode.ao);
                }
                
                /* copy passes, now just active node */
index 7aed6bce4c4f3aa4668b24172c61f0b9d6bf7800..7692956368cbd3e0e5d49f2764cb32c88b9bd104 100644 (file)
@@ -59,7 +59,7 @@ static void node_shader_exec_mix_rgb(void *UNUSED(data), bNode *node, bNodeStack
        nodestack_get_vec(vec, SOCK_VECTOR, in[2]);
 
        ramp_blend(node->custom1, col, col+1, col+2, fac, vec);
-       VECCOPY(out[0]->vec, col);
+       copy_v3_v3(out[0]->vec, col);
 }
 
 static int gpu_shader_mix_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
index c23c6d328cf984142c925031fa2d49648664fc06..40f2f65a193bcaa43358d145b63a64065a4fce80 100644 (file)
@@ -66,7 +66,7 @@ static void node_shader_exec_normal(void *UNUSED(data), bNode *node, bNodeStack
        
        nodestack_get_vec(vec, SOCK_VECTOR, in[0]);
        
-       VECCOPY(out[0]->vec, ((bNodeSocketValueVector*)sock->default_value)->value);
+       copy_v3_v3(out[0]->vec, ((bNodeSocketValueVector*)sock->default_value)->value);
        /* render normals point inside... the widget points outside */
        out[1]->vec[0]= -INPR(out[0]->vec, vec);
 }
index ea7fae8f961e5d791d9c6190d598c8bdaee1e675..22e3cab532dba4dae105268da970ec512aacc39f 100644 (file)
@@ -57,10 +57,10 @@ static void node_shader_exec_output(void *data, bNode *node, bNodeStack **in, bN
                if(node->flag & NODE_DO_OUTPUT) {
                        ShadeResult *shr= ((ShaderCallData *)data)->shr;
                        
-                       QUATCOPY(shr->combined, col);
+                       copy_v4_v4(shr->combined, col);
                        shr->alpha= col[3];
                        
-                       //      VECCOPY(shr->nor, in[3]->vec);
+                       //      copy_v3_v3(shr->nor, in[3]->vec);
                }
        }       
 }
index 1a0b4ea616b25ce6901269dbfe496f1100606c74..67c0ec165caff764fd9fdd9493a320b677b99ee8 100644 (file)
@@ -54,7 +54,7 @@ static void node_shader_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **U
        bNodeSocket *sock= node->outputs.first;
        float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value;
        
-       VECCOPY(out[0]->vec, col);
+       copy_v3_v3(out[0]->vec, col);
 }
 
 static int gpu_shader_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
index 588cdc1da838bb8004ae372b19edd694a0afdb45..42460e141e27a5a1ff6e6595e104bbeeb5ee3a55 100644 (file)
@@ -82,7 +82,7 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b
                                retval= multitex_nodes((Tex *)node->id, vec, NULL, NULL, 0, &texres, thread, which_output, NULL, NULL);
                }
                else {
-                       VECCOPY(vec, shi->lo);
+                       copy_v3_v3(vec, shi->lo);
                        retval= multitex_nodes((Tex *)node->id, vec, NULL, NULL, 0, &texres, thread, which_output, NULL, NULL);
                }
                
@@ -111,7 +111,7 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b
                        out[1]->vec[3]= 1.0f;
                }
                
-               VECCOPY(out[2]->vec, nor);
+               copy_v3_v3(out[2]->vec, nor);
                
                if(shi->do_preview)
                        nodeAddToPreview(node, out[1]->vec, shi->xs, shi->ys, shi->do_manage);
index 2011426b84545e4c9ad43bb7bbc5f83cdeeab705..0700085a787161144797182ca71a5881707c8a86 100644 (file)
@@ -107,9 +107,9 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
        if( ins_x < mortar_thickness || ins_y < mortar_thickness ||
                ins_x > (brick_width - mortar_thickness) ||
                ins_y > (row_height - mortar_thickness) ) {
-               QUATCOPY( out, mortar );
+               copy_v4_v4( out, mortar );
        } else {
-               QUATCOPY( out, bricks1 );
+               copy_v4_v4( out, bricks1 );
                ramp_blend( MA_RAMP_BLEND, out, out+1, out+2, tint, bricks2 );
        }
 }
index 111d6e7802332dacd322e56c51dfb15bb7023db2..3346592f7d3141c2be8bceafb09819c052125010 100644 (file)
@@ -66,7 +66,7 @@ static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float hue, float sat
                out[2]= mfac*in[2] + fac*col[2];
        }
        else {
-               QUATCOPY(out, in);
+               copy_v4_v4(out, in);
        }
 }
 
index 3a81ecb14665dd8297a3bcf4421b8366a2eaa895..0ead3a3dec24fa5321308eaf3c017e8496ad891d 100644 (file)
@@ -76,7 +76,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(i
                        while( py >= ibuf->y ) py -= ibuf->y;
                        
                        result = ibuf->rect_float + py*ibuf->x*4 + px*4;
-                       QUATCOPY( out, result );
+                       copy_v4_v4( out, result );
                }
        }
 }
index 3ad11026f28dfdbdf4855bc300ac582b04d8f8e8..5ee60d02e32bb00471e569241918a179ee38c740 100644 (file)
@@ -54,7 +54,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
        col[1] = 1.0f - col[1];
        col[2] = 1.0f - col[2];
        
-       VECCOPY(out, col);
+       copy_v3_v3(out, col);
        out[3] = col[3];
 }
 
index c68adf2f4aacf04b21a2c6e3f8c1ceec300737e3..e3b5119c797c2a65137f55760738868fdf6b3e07 100644 (file)
@@ -55,7 +55,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
        
        CLAMP(fac, 0.0f, 1.0f);
        
-       QUATCOPY(out, col1);
+       copy_v4_v4(out, col1);
        ramp_blend(node->custom1, out, out+1, out+2, fac, col2);
 }
 
index d9ac8700be16e0a67be01d341800a25d5148666b..3012d313db5b0f1e28dbeb319375c41f0d9b222b 100644 (file)
@@ -75,10 +75,10 @@ static void do_proc(float *result, TexParams *p, float *col1, float *col2, char
                return;
        
        if(textype & TEX_RGB) {
-               QUATCOPY(result, &texres.tr);
+               copy_v4_v4(result, &texres.tr);
        }
        else {
-               QUATCOPY(result, col1);
+               copy_v4_v4(result, col1);
                ramp_blend(MA_RAMP_BLEND, result, result+1, result+2, texres.tin, col2);
        }
 }
index 1b8eb3aabc673e6d44eeb7f6a114489198f16c48..667570582feb206e4b3c13b0c19d33db68d0d540 100644 (file)
@@ -65,7 +65,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
        
        if(node->custom2 || node->need_exec==0) {
                /* this node refers to its own texture tree! */
-               QUATCOPY(out, (fabs(co[0] - co[1]) < .01) ? white : red );
+               copy_v4_v4(out, (fabs(co[0] - co[1]) < .01) ? white : red );
        }
        else if(nodetex) {
                TexResult texres;
@@ -81,10 +81,10 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
                        &texres, thread, 0, p->shi, p->mtex);
                
                if(textype & TEX_RGB) {
-                       QUATCOPY(out, &texres.tr);
+                       copy_v4_v4(out, &texres.tr);
                }
                else {
-                       QUATCOPY(out, col1);
+                       copy_v4_v4(out, col1);
                        ramp_blend(MA_RAMP_BLEND, out, out+1, out+2, texres.tin, col2);
                }
        }