replace add_v3_v3v3() --> add_v3_v3() where possible
authorCampbell Barton <ideasman42@gmail.com>
Wed, 21 Apr 2010 12:27:48 +0000 (12:27 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 21 Apr 2010 12:27:48 +0000 (12:27 +0000)
54 files changed:
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/sketch.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenlib/intern/graph.c
source/blender/blenlib/intern/math_geom.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_generate.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/editcurve.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_lib.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/object/object_hook.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_cast.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_smooth.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/volumetric.c
source/blender/render/intern/source/voxeldata.c

index 36cf193..8a74ba1 100644 (file)
@@ -583,14 +583,14 @@ static void emDM__calcFaceCent(EditFace *efa, float cent[3], float (*vertexCos)[
 {
        if (vertexCos) {
                VECCOPY(cent, vertexCos[(int) efa->v1->tmp.l]);
-               add_v3_v3v3(cent, cent, vertexCos[(int) efa->v2->tmp.l]);
-               add_v3_v3v3(cent, cent, vertexCos[(int) efa->v3->tmp.l]);
-               if (efa->v4) add_v3_v3v3(cent, cent, vertexCos[(int) efa->v4->tmp.l]);
+               add_v3_v3(cent, vertexCos[(int) efa->v2->tmp.l]);
+               add_v3_v3(cent, vertexCos[(int) efa->v3->tmp.l]);
+               if (efa->v4) add_v3_v3(cent, vertexCos[(int) efa->v4->tmp.l]);
        } else {
                VECCOPY(cent, efa->v1->co);
-               add_v3_v3v3(cent, cent, efa->v2->co);
-               add_v3_v3v3(cent, cent, efa->v3->co);
-               if (efa->v4) add_v3_v3v3(cent, cent, efa->v4->co);
+               add_v3_v3(cent, efa->v2->co);
+               add_v3_v3(cent, efa->v3->co);
+               if (efa->v4) add_v3_v3(cent, efa->v4->co);
        }
 
        if (efa->v4) {
@@ -1369,15 +1369,15 @@ static DerivedMesh *getEditMeshDerivedMesh(EditMesh *em, Object *ob,
                                float *v4 = vertexCos[(int) efa->v4->tmp.l];
 
                                normal_quad_v3( no,v1, v2, v3, v4);
-                               add_v3_v3v3(emdm->vertexNos[(int) efa->v4->tmp.l], emdm->vertexNos[(int) efa->v4->tmp.l], no);
+                               add_v3_v3(emdm->vertexNos[(int) efa->v4->tmp.l], no);
                        }
                        else {
                                normal_tri_v3( no,v1, v2, v3);
                        }
 
-                       add_v3_v3v3(emdm->vertexNos[(int) efa->v1->tmp.l], emdm->vertexNos[(int) efa->v1->tmp.l], no);
-                       add_v3_v3v3(emdm->vertexNos[(int) efa->v2->tmp.l], emdm->vertexNos[(int) efa->v2->tmp.l], no);
-                       add_v3_v3v3(emdm->vertexNos[(int) efa->v3->tmp.l], emdm->vertexNos[(int) efa->v3->tmp.l], no);
+                       add_v3_v3(emdm->vertexNos[(int) efa->v1->tmp.l], no);
+                       add_v3_v3(emdm->vertexNos[(int) efa->v2->tmp.l], no);
+                       add_v3_v3(emdm->vertexNos[(int) efa->v3->tmp.l], no);
                }
 
                for(i=0, eve= em->verts.first; eve; i++, eve=eve->next) {
index 1040784..253da25 100644 (file)
@@ -1251,12 +1251,12 @@ static void blend_pose_offset_bone(bActionStrip *strip, bPose *dst, bPose *src,
                                /* if blending, we only add with factor scrweight */
                                mul_v3_fl(vec, srcweight);
                                
-                               add_v3_v3v3(dst->cyclic_offset, dst->cyclic_offset, vec);
+                               add_v3_v3(dst->cyclic_offset, vec);
                        }
                }
        }
        
-       add_v3_v3v3(dst->cyclic_offset, dst->cyclic_offset, src->cyclic_offset);
+       add_v3_v3(dst->cyclic_offset, src->cyclic_offset);
 }
 
 /* added "sizecorr" here, to allow armatures to be scaled and still have striding.
@@ -1616,7 +1616,7 @@ static void do_nla(Scene *scene, Object *ob, int blocktype)
        }
        else if(blocktype==ID_AR) {
                /* apply stride offset to object */
-               add_v3_v3v3(ob->obmat[3], ob->obmat[3], ob->pose->stride_offset);
+               add_v3_v3(ob->obmat[3], ob->pose->stride_offset);
        }
        
        /* free */
index c6120ac..34dcf41 100644 (file)
@@ -730,7 +730,7 @@ static void vertex_dupli__mapFunc(void *userData, int index, float *co, float *n
        VECCOPY(vec, co);
        mul_m4_v3(vdd->pmat, vec);
        sub_v3_v3v3(vec, vec, vdd->pmat[3]);
-       add_v3_v3v3(vec, vec, vdd->obmat[3]);
+       add_v3_v3(vec, vdd->obmat[3]);
        
        copy_m4_m4(obmat, vdd->obmat);
        VECCOPY(obmat[3], vec);
@@ -990,7 +990,7 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
                                                mul_m4_v3(pmat, cent);
                                                
                                                sub_v3_v3v3(cent, cent, pmat[3]);
-                                               add_v3_v3v3(cent, cent, ob__obmat[3]);
+                                               add_v3_v3(cent, ob__obmat[3]);
                                                
                                                copy_m4_m4(obmat, ob__obmat);
                                                
index b5b5547..dbc0317 100644 (file)
@@ -852,7 +852,7 @@ static float dist_bone_deform(bPoseChannel *pchan, float *vec, DualQuat *dq, flo
                                //      Make this a delta from the base position
                                sub_v3_v3v3(cop, cop, co);
                                cop[0]*=fac; cop[1]*=fac; cop[2]*=fac;
-                               add_v3_v3v3(vec, vec, cop);
+                               add_v3_v3(vec, cop);
 
                                if(mat)
                                        pchan_deform_mat_add(pchan, fac, bbonemat, mat);
@@ -1108,7 +1108,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm,
                                        mul_v3m3_dq( dco, (defMats)? summat: NULL,dq);
                                        sub_v3_v3v3(dco, dco, co);
                                        mul_v3_fl(dco, armature_weight);
-                                       add_v3_v3v3(co, co, dco);
+                                       add_v3_v3(co, dco);
                                }
                                else
                                        mul_v3m3_dq( co, (defMats)? summat: NULL,dq);
@@ -2262,7 +2262,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha
                                                        nor[0] = BLI_gNoise(amod->noisesize, size[0]+ofs, size[1], size[2], 0, 0) - ofs;
                                                        nor[1] = BLI_gNoise(amod->noisesize, size[0], size[1]+ofs, size[2], 0, 0) - ofs;        
                                                        nor[2] = BLI_gNoise(amod->noisesize, size[0], size[1], size[2]+ofs, 0, 0) - ofs;
-                                                       add_v3_v3v3(size, size, nor);
+                                                       add_v3_v3(size, nor);
                                                        
                                                        if (sizeo[0] != 0)
                                                                mul_v3_fl(pchan->pose_mat[0], size[0] / sizeo[0]);
@@ -2278,7 +2278,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha
                                                        nor[2] = BLI_gNoise(amod->noisesize, eul[0], eul[1], eul[2]+ofs, 0, 0) - ofs;
                                                        
                                                        compatible_eul(nor, eulo);
-                                                       add_v3_v3v3(eul, eul, nor);
+                                                       add_v3_v3(eul, nor);
                                                        compatible_eul(eul, eulo);
                                                        
                                                        loc_eul_size_to_mat4(pchan->pose_mat, loc, eul, size);
@@ -2381,7 +2381,7 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti
                
                /* only rootbones get the cyclic offset (unless user doesn't want that) */
                if ((bone->flag & BONE_NO_CYCLICOFFSET) == 0)
-                       add_v3_v3v3(pchan->pose_mat[3], pchan->pose_mat[3], ob->pose->cyclic_offset);
+                       add_v3_v3(pchan->pose_mat[3], ob->pose->cyclic_offset);
        }
        
        if(do_extra) {
index 25c42df..b18ab87 100644 (file)
@@ -141,7 +141,7 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
                        get_effector_data(eff, &efd, &epoint, 1);
 
                        mul_v3_fl(efd.vel, efd.distance / (val->max_speed * bbd->timestep));
-                       add_v3_v3v3(efd.loc, efd.loc, efd.vel);
+                       add_v3_v3(efd.loc, efd.vel);
                        sub_v3_v3v3(efd.vec_to_point, pa->prev_state.co, efd.loc);
                        efd.distance = len_v3(efd.vec_to_point);
                }
@@ -355,7 +355,7 @@ static int rule_separate(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Pa
        if(neighbors > 1 && ptn[1].dist!=0.0f) {
                sub_v3_v3v3(vec, pa->prev_state.co, bbd->sim->psys->particles[ptn[1].index].state.co);
                mul_v3_fl(vec, (2.0f * val->personal_space * pa->size - ptn[1].dist) / ptn[1].dist);
-               add_v3_v3v3(bbd->wanted_co, bbd->wanted_co, vec);
+               add_v3_v3(bbd->wanted_co, vec);
                bbd->wanted_speed = val->max_speed;
                len = ptn[1].dist;
                ret = 1;
@@ -372,7 +372,7 @@ static int rule_separate(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Pa
                        if(neighbors > 0 && ptn[0].dist < len) {
                                sub_v3_v3v3(vec, pa->prev_state.co, ptn[0].co);
                                mul_v3_fl(vec, (2.0f * val->personal_space * pa->size - ptn[0].dist) / ptn[1].dist);
-                               add_v3_v3v3(bbd->wanted_co, bbd->wanted_co, vec);
+                               add_v3_v3(bbd->wanted_co, vec);
                                bbd->wanted_speed = val->max_speed;
                                len = ptn[0].dist;
                                ret = 1;
@@ -393,8 +393,8 @@ static int rule_flock(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
 
        if(neighbors > 1) {
                for(n=1; n<neighbors; n++) {
-                       add_v3_v3v3(loc, loc, bbd->sim->psys->particles[ptn[n].index].prev_state.co);
-                       add_v3_v3v3(vec, vec, bbd->sim->psys->particles[ptn[n].index].prev_state.vel);
+                       add_v3_v3(loc, bbd->sim->psys->particles[ptn[n].index].prev_state.co);
+                       add_v3_v3(vec, bbd->sim->psys->particles[ptn[n].index].prev_state.vel);
                }
 
                mul_v3_fl(loc, 1.0f/((float)neighbors - 1.0f));
@@ -403,8 +403,8 @@ static int rule_flock(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
                sub_v3_v3v3(loc, loc, pa->prev_state.co);
                sub_v3_v3v3(vec, vec, pa->prev_state.vel);
 
-               add_v3_v3v3(bbd->wanted_co, bbd->wanted_co, vec);
-               add_v3_v3v3(bbd->wanted_co, bbd->wanted_co, loc);
+               add_v3_v3(bbd->wanted_co, vec);
+               add_v3_v3(bbd->wanted_co, loc);
                bbd->wanted_speed = len_v3(bbd->wanted_co);
 
                ret = 1;
@@ -567,7 +567,7 @@ static int rule_average_speed(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
 
                mul_v3_fl(bbd->wanted_co, 1.1f);
 
-               add_v3_v3v3(bbd->wanted_co, bbd->wanted_co, vec);
+               add_v3_v3(bbd->wanted_co, vec);
 
                /* leveling */
                if(asbr->level > 0.0f && psys_uses_gravity(bbd->sim)) {
@@ -748,7 +748,7 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *gro
 
                /* take surface velocity into account */
                closest_point_on_surface(surmd, pa->state.co, x, NULL, v);
-               add_v3_v3v3(x, x, v);
+               add_v3_v3(x, v);
 
                /* get actual position on surface */
                closest_point_on_surface(surmd, x, ground_co, ground_nor, NULL);
@@ -767,7 +767,7 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *gro
 
                VECCOPY(col.co1, pa->state.co);
                VECCOPY(col.co2, pa->state.co);
-               add_v3_v3v3(col.co1, col.co1, zvec);
+               add_v3_v3(col.co1, zvec);
                sub_v3_v3v3(col.co2, col.co2, zvec);
                sub_v3_v3v3(ray_dir, col.co2, col.co1);
                col.t = 0.0f;
@@ -956,7 +956,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
                        int n = 0;
                        for(rule = state->rules.first; rule; rule=rule->next) {
                                if(apply_boid_rule(bbd, rule, &val, pa, -1.0f)) {
-                                       add_v3_v3v3(wanted_co, wanted_co, bbd->wanted_co);
+                                       add_v3_v3(wanted_co, bbd->wanted_co);
                                        wanted_speed += bbd->wanted_speed;
                                        n++;
                                        bbd->wanted_co[0]=bbd->wanted_co[1]=bbd->wanted_co[2]=bbd->wanted_speed=0.0f;
@@ -1205,7 +1205,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
                mul_v3_fl(force, length);
        }
        
-       add_v3_v3v3(acc, acc, force);
+       add_v3_v3(acc, force);
 
        /* store smoothed acceleration for nice banking etc. */
        VECADDFAC(bpa->data.acc, bpa->data.acc, acc, dtime);
@@ -1222,8 +1222,8 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
        
        VECCOPY(bvec, pa->prev_state.vel);
        mul_v3_fl(bvec, dtime);
-       add_v3_v3v3(dvec, dvec, bvec);
-       add_v3_v3v3(pa->state.co, pa->state.co, dvec);
+       add_v3_v3(dvec, bvec);
+       add_v3_v3(pa->state.co, dvec);
 
        VECADDFAC(pa->state.vel, pa->state.vel, acc, dtime);
 
index b3e702c..204ff2a 100644 (file)
@@ -1347,12 +1347,12 @@ static void cdDM_foreachMappedFaceCenter(
                        orig = i;
 
                VECCOPY(cent, mv[mf->v1].co);
-               add_v3_v3v3(cent, cent, mv[mf->v2].co);
-               add_v3_v3v3(cent, cent, mv[mf->v3].co);
+               add_v3_v3(cent, mv[mf->v2].co);
+               add_v3_v3(cent, mv[mf->v3].co);
 
                if (mf->v4) {
                        normal_quad_v3( no,mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, mv[mf->v4].co);
-                       add_v3_v3v3(cent, cent, mv[mf->v4].co);
+                       add_v3_v3(cent, mv[mf->v4].co);
                        mul_v3_fl(cent, 0.25f);
                } else {
                        normal_tri_v3( no,mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co);
@@ -1750,11 +1750,11 @@ void CDDM_calc_normals(DerivedMesh *dm)
                else
                        normal_tri_v3( f_no,mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co);
                
-               add_v3_v3v3(temp_nors[mf->v1], temp_nors[mf->v1], f_no);
-               add_v3_v3v3(temp_nors[mf->v2], temp_nors[mf->v2], f_no);
-               add_v3_v3v3(temp_nors[mf->v3], temp_nors[mf->v3], f_no);
+               add_v3_v3(temp_nors[mf->v1], f_no);
+               add_v3_v3(temp_nors[mf->v2], f_no);
+               add_v3_v3(temp_nors[mf->v3], f_no);
                if(mf->v4)
-                       add_v3_v3v3(temp_nors[mf->v4], temp_nors[mf->v4], f_no);
+                       add_v3_v3(temp_nors[mf->v4], f_no);
        }
 
        /* normalize vertex normals and assign */
index c23f34e..a07fc4a 100644 (file)
@@ -447,8 +447,8 @@ static void contarget_get_mesh_mat (Scene *scene, Object *ob, char *substring, f
                                        if (dvert[i].dw[j].def_nr == dgroup) {
                                                dm->getVertCo(dm, i, co);
                                                dm->getVertNo(dm, i, nor);
-                                               add_v3_v3v3(vec, vec, co);
-                                               add_v3_v3v3(normal, normal, nor);
+                                               add_v3_v3(vec, co);
+                                               add_v3_v3(normal, nor);
                                                count++;
                                                break;
                                        }
@@ -535,7 +535,7 @@ static void contarget_get_lattice_mat (Object *ob, char *substring, float mat[][
                                else
                                        memcpy(tvec, bp->vec, 3*sizeof(float));
                                        
-                               add_v3_v3v3(vec, vec, tvec);
+                               add_v3_v3(vec, tvec);
                                grouped++;
                                
                                break;
index ac635e5..d744baa 100644 (file)
@@ -196,10 +196,10 @@ void addnormalsDispList(Object *ob, ListBase *lb)
        
                                                normal_quad_v3( nor,v1, v3, v4, v2);
        
-                                               add_v3_v3v3(n1, n1, nor);
-                                               add_v3_v3v3(n2, n2, nor);
-                                               add_v3_v3v3(n3, n3, nor);
-                                               add_v3_v3v3(n4, n4, nor);
+                                               add_v3_v3(n1, nor);
+                                               add_v3_v3(n2, nor);
+                                               add_v3_v3(n3, nor);
+                                               add_v3_v3(n4, nor);
        
                                                v2= v1; v1+= 3;
                                                v4= v3; v3+= 3;
index 00659b2..a0416bc 100644 (file)
@@ -576,10 +576,10 @@ int closest_point_on_surface(SurfaceModifierData *surmd, float *co, float *surfa
                        MFace *mface = CDDM_get_face(surmd->dm, nearest.index);
                        
                        VECCOPY(surface_vel, surmd->v[mface->v1].co);
-                       add_v3_v3v3(surface_vel, surface_vel, surmd->v[mface->v2].co);
-                       add_v3_v3v3(surface_vel, surface_vel, surmd->v[mface->v3].co);
+                       add_v3_v3(surface_vel, surmd->v[mface->v2].co);
+                       add_v3_v3(surface_vel, surmd->v[mface->v3].co);
                        if(mface->v4)
-                               add_v3_v3v3(surface_vel, surface_vel, surmd->v[mface->v4].co);
+                               add_v3_v3(surface_vel, surmd->v[mface->v4].co);
 
                        mul_v3_fl(surface_vel, mface->v4 ? 0.25f : 0.333f);
                }
@@ -600,7 +600,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
                /* using velocity corrected location allows for easier sliding over effector surface */
                copy_v3_v3(vec, point->vel);
                mul_v3_fl(vec, point->vel_to_frame);
-               add_v3_v3v3(vec, vec, point->loc);
+               add_v3_v3(vec, point->loc);
 
                ret = closest_point_on_surface(eff->surmd, vec, efd->loc, efd->nor, real_velocity ? efd->vel : NULL);
 
@@ -827,7 +827,7 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
                VECADDFAC(force, force, efd->nor, fac);
        }
 
-       add_v3_v3v3(total_force, total_force, force);
+       add_v3_v3(total_force, force);
 }
 void do_physical_effector(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, float *total_force)
 {
@@ -874,7 +874,7 @@ void do_physical_effector(EffectorCache *eff, EffectorData *efd, EffectedPoint *
                                mul_v3_fl(force, strength * efd->falloff);
                                
                                VECADDFAC(temp, temp, point->vel, -point->vel_to_sec);
-                               add_v3_v3v3(force, force, temp);
+                               add_v3_v3(force, temp);
                        }
                        break;
                case PFIELD_MAGNET:
@@ -893,7 +893,7 @@ void do_physical_effector(EffectorCache *eff, EffectorData *efd, EffectedPoint *
                        mul_v3_fl(force, -strength * efd->falloff);
                        copy_v3_v3(temp, point->vel);
                        mul_v3_fl(temp, -damp * 2.0f * (float)sqrt(fabs(strength)) * point->vel_to_sec);
-                       add_v3_v3v3(force, force, temp);
+                       add_v3_v3(force, temp);
                        break;
                case PFIELD_CHARGE:
                        mul_v3_fl(force, point->charge * strength * efd->falloff);
@@ -950,7 +950,7 @@ void do_physical_effector(EffectorCache *eff, EffectorData *efd, EffectedPoint *
                if(pd->f_flow != 0.0f) {
                        VECADDFAC(dave, dave, point->ave, -pd->f_flow * efd->falloff);
                }
-               add_v3_v3v3(point->ave, point->ave, dave);
+               add_v3_v3(point->ave, dave);
        }
 }
 
index fd4a8a0..6ddc4b8 100644 (file)
@@ -1233,11 +1233,11 @@ void mesh_calc_normals(MVert *mverts, int numVerts, MFace *mfaces, int numFaces,
                else
                        normal_tri_v3( f_no,mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co);
                
-               add_v3_v3v3(tnorms[mf->v1], tnorms[mf->v1], f_no);
-               add_v3_v3v3(tnorms[mf->v2], tnorms[mf->v2], f_no);
-               add_v3_v3v3(tnorms[mf->v3], tnorms[mf->v3], f_no);
+               add_v3_v3(tnorms[mf->v1], f_no);
+               add_v3_v3(tnorms[mf->v2], f_no);
+               add_v3_v3(tnorms[mf->v3], f_no);
                if (mf->v4)
-                       add_v3_v3v3(tnorms[mf->v4], tnorms[mf->v4], f_no);
+                       add_v3_v3(tnorms[mf->v4], f_no);
        }
        for (i=0; i<numVerts; i++) {
                MVert *mv= &mverts[i];
index bad1ebc..c1baced 100644 (file)
@@ -1813,7 +1813,7 @@ static void ob_parbone(Object *ob, Object *par, float mat[][4])
        /* but for backwards compatibility, the child has to move to the tail */
        VECCOPY(vec, mat[1]);
        mul_v3_fl(vec, pchan->bone->length);
-       add_v3_v3v3(mat[3], mat[3], vec);
+       add_v3_v3(mat[3], vec);
 }
 
 static void give_parvert(Object *par, int nr, float *vec)
@@ -1851,7 +1851,7 @@ static void give_parvert(Object *par, int nr, float *vec)
                                        vindex= (index)? index[i]: i;
 
                                        if(vindex == nr) {
-                                               add_v3_v3v3(vec, vec, mvert[i].co);
+                                               add_v3_v3(vec, mvert[i].co);
                                                count++;
                                        }
                                }
@@ -1960,7 +1960,7 @@ static void ob_parvert3(Object *ob, Object *par, float mat[][4])
                }
                else {
                        add_v3_v3v3(mat[3], v1, v2);
-                       add_v3_v3v3(mat[3], mat[3], v3);
+                       add_v3_v3(mat[3], v3);
                        mul_v3_fl(mat[3], 0.3333333f);
                }
        }
@@ -2342,7 +2342,7 @@ void minmax_object(Object *ob, float *min, float *max)
                DO_MINMAX(ob->obmat[3], min, max);
 
                VECCOPY(vec, ob->obmat[3]);
-               add_v3_v3v3(vec, vec, ob->size);
+               add_v3_v3(vec, ob->size);
                DO_MINMAX(vec, min, max);
 
                VECCOPY(vec, ob->obmat[3]);
index e1b91b7..31378e3 100644 (file)
@@ -2126,7 +2126,7 @@ static void do_path_effectors(ParticleSimulationData *sim, int i, ParticleCacheK
 
        mul_v3_fl(force, effector*pow((float)k / (float)steps, 100.0f * sim->psys->part->eff_hair) / (float)steps);
 
-       add_v3_v3v3(force, force, vec);
+       add_v3_v3(force, vec);
 
        normalize_v3(force);
 
index ecafd08..6032a0e 100644 (file)
@@ -260,7 +260,7 @@ void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], f
 
                VECCOPY(p, delta_p);
                mul_v3_fl(p, delta);
-               add_v3_v3v3(p, p, p_start);
+               add_v3_v3(p, p_start);
        }
 }
 
@@ -337,7 +337,7 @@ void sk_flattenStroke(SK_Stroke *stk, int start, int end)
                mul_v3_fl(offset, d);
 
                sub_v3_v3v3(p, p, distance);
-               add_v3_v3v3(p, p, offset);
+               add_v3_v3(p, offset);
        }
 }
 
index e6f500a..b827494 100644 (file)
@@ -1580,7 +1580,7 @@ static void _scan_for_ext_spring_forces(Scene *scene, Object *ob, float timenow,
                                if (ob->softflag & OB_SB_EDGECOLL){
                                        if ( sb_detect_edge_collisionCached (sb->bpoint[bs->v1].pos , sb->bpoint[bs->v2].pos,
                                                &damp,feedback,ob->lay,ob,timenow)){
-                                                       add_v3_v3v3(bs->ext_force,bs->ext_force,feedback);
+                                                       add_v3_v3(bs->ext_force, feedback);
                                                        bs->flag |= BSF_INTERSECT;
                                                        //bs->cf=damp;
                                                        bs->cf=sb->choke*0.01f;
@@ -1605,7 +1605,7 @@ static void _scan_for_ext_spring_forces(Scene *scene, Object *ob, float timenow,
                                                pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
 
                                                mul_v3_fl(speed,windfactor); 
-                                               add_v3_v3v3(vel,vel,speed);
+                                               add_v3_v3(vel, speed);
                                        }
                                        /* media in rest */
                                        else{
@@ -2291,7 +2291,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
                                float gravity[3];
                                VECCOPY(gravity, scene->physics_settings.gravity);
                                mul_v3_fl(gravity, sb_grav_force_scale(ob)*_final_mass(ob,bp)*sb->effector_weights->global_gravity); /* individual mass of node here */
-                               add_v3_v3v3(bp->force, bp->force, gravity);
+                               add_v3_v3(bp->force, gravity);
                        }
                        
                        /* particle field & vortex */
@@ -2358,7 +2358,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
                                        for(b=bp->nofsprings;b>0;b--){
                                                bs = sb->bspring + bp->springs[b-1];
                                                if (do_springcollision || do_aero){
-                                                       add_v3_v3v3(bp->force,bp->force,bs->ext_force);
+                                                       add_v3_v3(bp->force, bs->ext_force);
                                                        if (bs->flag & BSF_INTERSECT)
                                                                bp->choke = bs->cf; 
 
@@ -2799,7 +2799,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
                                                for(b=bp->nofsprings;b>0;b--){
                                                        bs = sb->bspring + bp->springs[b-1];
                                                        if (do_springcollision || do_aero){
-                                                               add_v3_v3v3(bp->force,bp->force,bs->ext_force);
+                                                               add_v3_v3(bp->force, bs->ext_force);
                                                                if (bs->flag & BSF_INTERSECT)
                                                                        bp->choke = bs->cf; 
 
index 16cb671..db63f09 100644 (file)
@@ -2679,7 +2679,7 @@ void subsurf_calculate_limit_positions(Mesh *me, float (*positions_r)[3])
                }
                for (i=0; i<numFaces; i++) {
                        CCGFace *f = ccgSubSurf_getVertFace(v, i);
-                       add_v3_v3v3(face_sum, face_sum, ccgSubSurf_getFaceCenterData(f));
+                       add_v3_v3(face_sum, ccgSubSurf_getFaceCenterData(f));
                }
 
                /* ad-hoc correction for boundary vertices, to at least avoid them
index 808dc74..b1ea058 100644 (file)
@@ -529,7 +529,7 @@ void BLI_mirrorAlongAxis(float v[3], float center[3], float axis[3])
        sub_v3_v3v3(dv, v, center);
        project_v3_v3v3(pv, dv, axis);
        mul_v3_fl(pv, -2);
-       add_v3_v3v3(v, v, pv);
+       add_v3_v3(v, pv);
 }
 
 static void testRadialSymmetry(BGraph *graph, BNode* root_node, RadialArc* ring, int total, float axis[3], float limit, int group)
@@ -801,7 +801,7 @@ static void testAxialSymmetry(BGraph *graph, BNode* root_node, BNode* node1, BNo
 
        sub_v3_v3v3(p, root_node->p, node2->p);
        cross_v3_v3v3(vec, p, axis);
-       add_v3_v3v3(vec, vec, nor);
+       add_v3_v3(vec, nor);
        
        cross_v3_v3v3(nor, vec, axis);
        
@@ -905,7 +905,7 @@ static void markdownSecondarySymmetry(BGraph *graph, BNode *node, int depth, int
                /* If arc is on the axis */
                else if (connectedArc->symmetry_level == level)
                {
-                       add_v3_v3v3(axis, axis, connectedArc->head->p);
+                       add_v3_v3(axis, connectedArc->head->p);
                        sub_v3_v3v3(axis, axis, connectedArc->tail->p);
                }
        }
index af408e6..f973d4e 100644 (file)
@@ -719,7 +719,7 @@ int isect_sweeping_sphere_tri_v3(float p1[3], float p2[3], float radius, float v
                        *lambda = newLambda;
                        copy_v3_v3(ipoint,e1);
                        mul_v3_fl(ipoint,e);
-                       add_v3_v3v3(ipoint,ipoint,v0);
+                       add_v3_v3(ipoint, v0);
                        found_by_sweep=1;
                }
        }
@@ -743,7 +743,7 @@ int isect_sweeping_sphere_tri_v3(float p1[3], float p2[3], float radius, float v
                        *lambda = newLambda;
                        copy_v3_v3(ipoint,e2);
                        mul_v3_fl(ipoint,e);
-                       add_v3_v3v3(ipoint,ipoint,v0);
+                       add_v3_v3(ipoint, v0);
                        found_by_sweep=1;
                }
        }
@@ -772,7 +772,7 @@ int isect_sweeping_sphere_tri_v3(float p1[3], float p2[3], float radius, float v
                        *lambda = newLambda;
                        copy_v3_v3(ipoint,e3);
                        mul_v3_fl(ipoint,e);
-                       add_v3_v3v3(ipoint,ipoint,v1);
+                       add_v3_v3(ipoint, v1);
                        found_by_sweep=1;
                }
        }
@@ -1832,7 +1832,7 @@ void sum_or_add_vertex_tangent(void *arena, VertexTangent **vtang, float *tang,
        /* find a tangent with connected uvs */
        for(vt= *vtang; vt; vt=vt->next) {
                if(fabs(uv[0]-vt->uv[0]) < STD_UV_CONNECT_LIMIT && fabs(uv[1]-vt->uv[1]) < STD_UV_CONNECT_LIMIT) {
-                       add_v3_v3v3(vt->tang, vt->tang, tang);
+                       add_v3_v3(vt->tang, tang);
                        return;
                }
        }
@@ -1952,19 +1952,19 @@ void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,flo
                                float v[3];
                                copy_v3_v3(v,pos[a]);
                                mul_v3_fl(v,weight[a]);
-                               add_v3_v3v3(accu_com,accu_com,v);
+                               add_v3_v3(accu_com, v);
                                accu_weight +=weight[a]; 
                        }
-                       else add_v3_v3v3(accu_com,accu_com,pos[a]);
+                       else add_v3_v3(accu_com, pos[a]);
 
                        if (rweight){
                                float v[3];
                                copy_v3_v3(v,rpos[a]);
                                mul_v3_fl(v,rweight[a]);
-                               add_v3_v3v3(accu_rcom,accu_rcom,v);
+                               add_v3_v3(accu_rcom, v);
                                accu_rweight +=rweight[a]; 
                        }
-                       else add_v3_v3v3(accu_rcom,accu_rcom,rpos[a]);
+                       else add_v3_v3(accu_rcom, rpos[a]);
 
                }
                if (!weight || !rweight){
index 5881954..6363732 100644 (file)
@@ -3839,7 +3839,7 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo
                VECCOPY(selbone->head, actbone->tail);
                selbone->rad_head= actbone->rad_tail;
                
-               add_v3_v3v3(selbone->tail, selbone->tail, offset);
+               add_v3_v3(selbone->tail, offset);
                
                /* offset for all its children */
                for (ebone = edbo->first; ebone; ebone=ebone->next) {
@@ -3847,8 +3847,8 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo
                        
                        for (par= ebone->parent; par; par= par->parent) {
                                if (par==selbone) {
-                                       add_v3_v3v3(ebone->head, ebone->head, offset);
-                                       add_v3_v3v3(ebone->tail, ebone->tail, offset);
+                                       add_v3_v3(ebone->head, offset);
+                                       add_v3_v3(ebone->tail, offset);
                                        break;
                                }
                        }
@@ -4218,8 +4218,8 @@ static void fix_connected_bone(EditBone *ebone)
        
        /* if the parent has moved we translate child's head and tail accordingly*/
        sub_v3_v3v3(diff, ebone->parent->tail, ebone->head);
-       add_v3_v3v3(ebone->head, ebone->head, diff);
-       add_v3_v3v3(ebone->tail, ebone->tail, diff);
+       add_v3_v3(ebone->head, diff);
+       add_v3_v3(ebone->tail, diff);
        return;
 }
 
index a7f79bb..d432b2f 100644 (file)
@@ -249,7 +249,7 @@ int nextLengthSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int st
                                {
                                        VECCOPY(p, dv);
                                        mul_v3_fl(p, f);
-                                       add_v3_v3v3(p, p, vec0);
+                                       add_v3_v3(p, vec0);
                                }
                                else
                                {
@@ -265,7 +265,7 @@ int nextLengthSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int st
                                 
                                VECCOPY(p, dv);
                                mul_v3_fl(p, lengthLimit);
-                               add_v3_v3v3(p, p, head);
+                               add_v3_v3(p, head);
                        }
                        
                        return i - 1; /* restart at lower bound */
index e9ad91c..307abe8 100644 (file)
@@ -607,7 +607,7 @@ void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end)
 
                        glPopMatrix();
 
-                       add_v3_v3v3(rgb, rgb, d_rgb);
+                       add_v3_v3(rgb, d_rgb);
                }
        }
 
@@ -1005,7 +1005,7 @@ void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float
                viewray(ar, v3d, pval, ray_start, ray_normal);
 
                mul_v3_fl(ray_normal, distance * progress / length);
-               add_v3_v3v3(stk->points[i].p, stk->points[i].p, ray_normal);
+               add_v3_v3(stk->points[i].p, ray_normal);
 
                progress += delta ;
        }
@@ -1628,7 +1628,7 @@ int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gesture)
 
                                sub_v3_v3v3(isect->p, gesture->points[s_i + 1].p, gesture->points[s_i].p);
                                mul_v3_fl(isect->p, lambda);
-                               add_v3_v3v3(isect->p, isect->p, gesture->points[s_i].p);
+                               add_v3_v3(isect->p, gesture->points[s_i].p);
 
                                BLI_addtail(list, isect);
 
index 4f0805c..700f457 100644 (file)
@@ -546,9 +546,9 @@ void heat_calc_vnormals(LaplacianSystem *sys)
 
                normal_tri_v3( fnor,sys->verts[v1], sys->verts[v2], sys->verts[v3]);
                
-               add_v3_v3v3(sys->heat.vnors[v1], sys->heat.vnors[v1], fnor);
-               add_v3_v3v3(sys->heat.vnors[v2], sys->heat.vnors[v2], fnor);
-               add_v3_v3v3(sys->heat.vnors[v3], sys->heat.vnors[v3], fnor);
+               add_v3_v3(sys->heat.vnors[v1], fnor);
+               add_v3_v3(sys->heat.vnors[v2], fnor);
+               add_v3_v3(sys->heat.vnors[v3], fnor);
        }
 
        for(a=0; a<sys->totvert; a++)
@@ -825,7 +825,7 @@ static void rigid_add_half_edge_to_rhs(LaplacianSystem *sys, EditVert *v1, EditV
        mul_v3_fl(rhs, 0.5f);
        mul_v3_fl(rhs, w);
 
-       add_v3_v3v3(sys->rigid.rhs[v1->tmp.l], sys->rigid.rhs[v1->tmp.l], rhs);
+       add_v3_v3(sys->rigid.rhs[v1->tmp.l], rhs);
 }
 
 static void rigid_add_edge_to_rhs(LaplacianSystem *sys, EditVert *v1, EditVert *v2, float w)
index 04bf5bc..8842e08 100644 (file)
@@ -491,11 +491,11 @@ void repositionNodes(ReebGraph *rg)
                        
                        VECCOPY(p, ((ReebArc*)arc)->buckets[0].p);
                        mul_v3_fl(p, 1.0f / arc->head->degree);
-                       add_v3_v3v3(arc->head->p, arc->head->p, p);
+                       add_v3_v3(arc->head->p, p);
                        
                        VECCOPY(p, ((ReebArc*)arc)->buckets[((ReebArc*)arc)->bcount - 1].p);
                        mul_v3_fl(p, 1.0f / arc->tail->degree);
-                       add_v3_v3v3(arc->tail->p, arc->tail->p, p);
+                       add_v3_v3(arc->tail->p, p);
                }
        }
 }
@@ -1103,7 +1103,7 @@ void REEB_AxialSymmetry(BNode* root_node, BNode* node1, BNode* node2, struct BAr
        BLI_mirrorAlongAxis(p, root_node->p, nor);
 
        /* average with node1 */
-       add_v3_v3v3(node1->p, node1->p, p);
+       add_v3_v3(node1->p, p);
        mul_v3_fl(node1->p, 0.5f);
        
        /* mirror back on node2 */
@@ -1821,7 +1821,7 @@ int filterSmartReebGraph(ReebGraph *rg, float threshold)
                                efa->tmp.fp = saacos(fabs(angle));
 #endif
 #else
-                               add_v3_v3v3(avg_vec, avg_vec, efa->n);          
+                               add_v3_v3(avg_vec, efa->n);             
 #endif
                        }
 
index 16df006..32572da 100644 (file)
@@ -602,9 +602,9 @@ static void translateflagNurb(ListBase *editnurb, short flag, float *vec)
                        a= nu->pntsu;
                        bezt= nu->bezt;
                        while(a--) {
-                               if(bezt->f1 & flag) add_v3_v3v3(bezt->vec[0], bezt->vec[0], vec);
-                               if(bezt->f2 & flag) add_v3_v3v3(bezt->vec[1], bezt->vec[1], vec);
-                               if(bezt->f3 & flag) add_v3_v3v3(bezt->vec[2], bezt->vec[2], vec);
+                               if(bezt->f1 & flag) add_v3_v3(bezt->vec[0], vec);
+                               if(bezt->f2 & flag) add_v3_v3(bezt->vec[1], vec);
+                               if(bezt->f3 & flag) add_v3_v3(bezt->vec[2], vec);
                                bezt++;
                        }
                }
@@ -612,7 +612,7 @@ static void translateflagNurb(ListBase *editnurb, short flag, float *vec)
                        a= nu->pntsu*nu->pntsv;
                        bp= nu->bp;
                        while(a--) {
-                               if(bp->f1 & flag) add_v3_v3v3(bp->vec, bp->vec, vec);
+                               if(bp->f1 & flag) add_v3_v3(bp->vec, vec);
                                bp++;
                        }
                }
@@ -2759,7 +2759,7 @@ static void make_selection_list_nurb(ListBase *editnurb)
                        bp= nu->bp;
                        a= nu->pntsu;
                        while(a--) {
-                               add_v3_v3v3(nus->vec, nus->vec, bp->vec);
+                               add_v3_v3(nus->vec, bp->vec);
                                bp++;
                        }
                        mul_v3_fl(nus->vec, 1.0/(float)nu->pntsu);
index 3a57dab..857423f 100644 (file)
@@ -140,7 +140,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
                        if( (eed->v1->f & SELECT)+(eed->v2->f & SELECT) == SELECT ) {
                                if(eed->v1->f & SELECT) sub_v3_v3v3(vec, eed->v1->co, eed->v2->co);
                                else sub_v3_v3v3(vec, eed->v2->co, eed->v1->co);
-                               add_v3_v3v3(nor, nor, vec);
+                               add_v3_v3(nor, vec);
                                done= 1;
                        }
                }
index 7236c34..2fc8452 100644 (file)
@@ -998,7 +998,7 @@ static void add_normal_aligned(float *nor, float *add)
        if( INPR(nor, add) < -0.9999f)
                sub_v3_v3v3(nor, nor, add);
        else
-               add_v3_v3v3(nor, nor, add);
+               add_v3_v3(nor, add);
 }
 
 static void set_edge_directions_f2(EditMesh *em, int val)
@@ -2006,15 +2006,15 @@ void recalc_editnormals(EditMesh *em)
                if(efa->v4) {
                        normal_quad_v3( efa->n,efa->v1->co, efa->v2->co, efa->v3->co, efa->v4->co);
                        cent_quad_v3(efa->cent, efa->v1->co, efa->v2->co, efa->v3->co, efa->v4->co);
-                       add_v3_v3v3(efa->v4->no, efa->v4->no, efa->n);
+                       add_v3_v3(efa->v4->no, efa->n);
                }
                else {
                        normal_tri_v3( efa->n,efa->v1->co, efa->v2->co, efa->v3->co);
                        cent_tri_v3(efa->cent, efa->v1->co, efa->v2->co, efa->v3->co);
                }
-               add_v3_v3v3(efa->v1->no, efa->v1->no, efa->n);
-               add_v3_v3v3(efa->v2->no, efa->v2->no, efa->n);
-               add_v3_v3v3(efa->v3->no, efa->v3->no, efa->n);
+               add_v3_v3(efa->v1->no, efa->n);
+               add_v3_v3(efa->v2->no, efa->n);
+               add_v3_v3(efa->v3->no, efa->n);
        }
 
        /* following Mesh convention; we use vertex coordinate itself for normal in this case */
index 3a5d538..e82c289 100644 (file)
@@ -4301,11 +4301,11 @@ static int smooth_vertex(bContext *C, wmOperator *op)
                        
                        if((eed->v1->f & SELECT) && eed->v1->f1<255) {
                                eed->v1->f1++;
-                               add_v3_v3v3(eed->v1->tmp.p, eed->v1->tmp.p, fvec);
+                               add_v3_v3(eed->v1->tmp.p, fvec);
                        }
                        if((eed->v2->f & SELECT) && eed->v2->f1<255) {
                                eed->v2->f1++;
-                               add_v3_v3v3(eed->v2->tmp.p, eed->v2->tmp.p, fvec);
+                               add_v3_v3(eed->v2->tmp.p, fvec);
                        }
                }
                eed= eed->next;
@@ -4426,7 +4426,7 @@ void vertexnoise(Object *obedit, EditMesh *em)
                                vec[1]= 0.2*(b2-BLI_hnoise(tex->noisesize, eve->co[0], eve->co[1]+ofs, eve->co[2]));
                                vec[2]= 0.2*(b2-BLI_hnoise(tex->noisesize, eve->co[0], eve->co[1], eve->co[2]+ofs));
                                
-                               add_v3_v3v3(eve->co, eve->co, vec);
+                               add_v3_v3(eve->co, vec);
                        }
                        else {
                                float tin, dum;
index b66fa6d..6b8d052 100644 (file)
@@ -1446,7 +1446,7 @@ static void alter_co(float *co, EditEdge *edge, float smooth, float fractal, int
                vec1[0]= fac*(float)(0.5-BLI_drand());
                vec1[1]= fac*(float)(0.5-BLI_drand());
                vec1[2]= fac*(float)(0.5-BLI_drand());
-               add_v3_v3v3(co, co, vec1);
+               add_v3_v3(co, vec1);
        }
 }
 
@@ -5161,7 +5161,7 @@ static int blend_from_shape_exec(bContext *C, wmOperator *op)
 
                                        if(add) {
                                                mul_v3_fl(co, blend);
-                                               add_v3_v3v3(eve->co, eve->co, co);
+                                               add_v3_v3(eve->co, co);
                                        }
                                        else
                                                interp_v3_v3v3(eve->co, eve->co, co, blend);
@@ -5777,7 +5777,7 @@ static void em_snap_to_center(EditMesh *em)
 
        for (eve=em->verts.first; eve; eve=eve->next) {
                if (eve->f & SELECT) {
-                       add_v3_v3v3(cent, cent, eve->co);
+                       add_v3_v3(cent, eve->co);
                        i++;
                }
        }
index 0d2d39f..99bca7e 100644 (file)
@@ -715,11 +715,11 @@ void sort_faces(Scene *scene, View3D *v3d)
                                /* find the faces center */
                                add_v3_v3v3(vec, (me->mvert+mf->v1)->co, (me->mvert+mf->v2)->co);
                                if (mf->v4) {
-                                       add_v3_v3v3(vec, vec, (me->mvert+mf->v3)->co);
-                                       add_v3_v3v3(vec, vec, (me->mvert+mf->v4)->co);
+                                       add_v3_v3(vec, (me->mvert+mf->v3)->co);
+                                       add_v3_v3(vec, (me->mvert+mf->v4)->co);
                                        mul_v3_fl(vec, 0.25f);
                                } else {
-                                       add_v3_v3v3(vec, vec, (me->mvert+mf->v3)->co);
+                                       add_v3_v3(vec, (me->mvert+mf->v3)->co);
                                        mul_v3_fl(vec, 1.0f/3.0f);
                                } /* done */
                                
index 624b498..eba6db6 100644 (file)
@@ -85,7 +85,7 @@ static int return_editmesh_indexar(EditMesh *em, int *tot, int **indexar, float
        for(eve= em->verts.first; eve; eve= eve->next) {
                if(eve->f & SELECT) {
                        *index= nr; index++;
-                       add_v3_v3v3(cent, cent, eve->co);
+                       add_v3_v3(cent, eve->co);
                }
                nr++;
        }
@@ -113,7 +113,7 @@ static int return_editmesh_vgroup(Object *obedit, EditMesh *em, char *name, floa
                                for(i=0; i<dvert->totweight; i++){
                                        if(dvert->dw[i].def_nr == (obedit->actdef-1)) {
                                                totvert++;
-                                               add_v3_v3v3(cent, cent, eve->co);
+                                               add_v3_v3(cent, eve->co);
                                        }
                                }
                        }
@@ -178,7 +178,7 @@ static int return_editlattice_indexar(Lattice *editlatt, int *tot, int **indexar
                if(bp->f1 & SELECT) {
                        if(bp->hide==0) {
                                *index= nr; index++;
-                               add_v3_v3v3(cent, cent, bp->vec);
+                               add_v3_v3(cent, bp->vec);
                        }
                }
                bp++;
@@ -251,17 +251,17 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
                        while(a--) {
                                if(bezt->f1 & SELECT) {
                                        *index= nr; index++;
-                                       add_v3_v3v3(cent, cent, bezt->vec[0]);
+                                       add_v3_v3(cent, bezt->vec[0]);
                                }
                                nr++;
                                if(bezt->f2 & SELECT) {
                                        *index= nr; index++;
-                                       add_v3_v3v3(cent, cent, bezt->vec[1]);
+                                       add_v3_v3(cent, bezt->vec[1]);
                                }
                                nr++;
                                if(bezt->f3 & SELECT) {
                                        *index= nr; index++;
-                                       add_v3_v3v3(cent, cent, bezt->vec[2]);
+                                       add_v3_v3(cent, bezt->vec[2]);
                                }
                                nr++;
                                bezt++;
@@ -273,7 +273,7 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
                        while(a--) {
                                if(bp->f1 & SELECT) {
                                        *index= nr; index++;
-                                       add_v3_v3v3(cent, cent, bp->vec);
+                                       add_v3_v3(cent, bp->vec);
                                }
                                nr++;
                                bp++;
index b45b06d..084b4c1 100644 (file)
@@ -897,13 +897,13 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
                                        if(dot<dist_1st) {
                                                normalize_v3(dvec);
                                                mul_v3_fl(dvec,dist_1st-dot);
-                                               add_v3_v3v3(key->co,key->co,dvec);
+                                               add_v3_v3(key->co, dvec);
                                        }
                                }
                                else {
                                        normalize_v3(dvec);
                                        mul_v3_fl(dvec,dist_1st-dot);
-                                       add_v3_v3v3(key->co,key->co,dvec);
+                                       add_v3_v3(key->co, dvec);
                                }
                                if(k==1)
                                        dist_1st*=1.3333f;
@@ -989,7 +989,7 @@ static void pe_iterate_lengths(Scene *scene, PTCacheEdit *edit)
                                }
 
                                if(k) {
-                                       add_v3_v3v3((key-1)->co,(key-1)->co,dv1);
+                                       add_v3_v3((key-1)->co, dv1);
                                }
 
                                VECADD(dv1,dv0,dv2);
index 40bc4dc..2da638f 100644 (file)
@@ -1642,10 +1642,10 @@ static void scale_quad(float insetCos[4][3], float *origCos[4], const float inse
        mul_v3_fl(insetCos[2], inset);
        mul_v3_fl(insetCos[3], inset);
        
-       add_v3_v3v3(insetCos[0], insetCos[0], cent);
-       add_v3_v3v3(insetCos[1], insetCos[1], cent);
-       add_v3_v3v3(insetCos[2], insetCos[2], cent);
-       add_v3_v3v3(insetCos[3], insetCos[3], cent);
+       add_v3_v3(insetCos[0], cent);
+       add_v3_v3(insetCos[1], cent);
+       add_v3_v3(insetCos[2], cent);
+       add_v3_v3(insetCos[3], cent);
 }
 
 
@@ -1664,9 +1664,9 @@ static void scale_tri(float insetCos[4][3], float *origCos[4], const float inset
        mul_v3_fl(insetCos[1], inset);
        mul_v3_fl(insetCos[2], inset);
        
-       add_v3_v3v3(insetCos[0], insetCos[0], cent);
-       add_v3_v3v3(insetCos[1], insetCos[1], cent);
-       add_v3_v3v3(insetCos[2], insetCos[2], cent);
+       add_v3_v3(insetCos[0], cent);
+       add_v3_v3(insetCos[1], cent);
+       add_v3_v3(insetCos[2], cent);
 }
 
 
@@ -2973,7 +2973,7 @@ static void project_paint_begin(ProjPaintState *ps)
                VECCOPY(ps->viewPos, viewinv[3]);
                copy_m3_m4(mat, ps->ob->imat);
                mul_m3_v3(mat, ps->viewPos);
-               add_v3_v3v3(ps->viewPos, ps->viewPos, ps->ob->imat[3]);
+               add_v3_v3(ps->viewPos, ps->ob->imat[3]);
        }
        
        /* calculate vert screen coords
index 509a1bc..85c3350 100644 (file)
@@ -752,9 +752,9 @@ static void sculpt_clip(Sculpt *sd, SculptSession *ss, float *co, const float va
 static void add_norm_if(float view_vec[3], float out[3], float out_flip[3], float fno[3])
 {
        if((dot_v3v3(view_vec, fno)) > 0) {
-               add_v3_v3v3(out, out, fno);
+               add_v3_v3(out, fno);
        } else {
-               add_v3_v3v3(out_flip, out_flip, fno); /* out_flip is used when out is {0,0,0} */
+               add_v3_v3(out_flip, fno); /* out_flip is used when out is {0,0,0} */
        }
 }
 
@@ -812,8 +812,8 @@ static void calc_area_normal(Sculpt *sd, SculptSession *ss, float area_normal[3]
                #pragma omp critical
                {
                        /* we sum per node and add together later for threads */
-                       add_v3_v3v3(out, out, nout);
-                       add_v3_v3v3(out_flip, out_flip, nout_flip);
+                       add_v3_v3(out, nout);
+                       add_v3_v3(out_flip, nout_flip);
                }
        }
 
@@ -903,7 +903,7 @@ static void neighbor_average(SculptSession *ss, float avg[3], const int vert)
 
                for(i=0; i<(f->v4?4:3); ++i) {
                        if(i != skip && (ncount!=2 || BLI_countlist(&ss->fmap[(&f->v1)[i]]) <= 2)) {
-                               add_v3_v3v3(avg, avg, ss->mvert[(&f->v1)[i]].co);
+                               add_v3_v3(avg, ss->mvert[(&f->v1)[i]].co);
                                ++total;
                        }
                }
@@ -1206,7 +1206,7 @@ static void do_inflate_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, in
                                add[0]*= ss->cache->scale[0];
                                add[1]*= ss->cache->scale[1];
                                add[2]*= ss->cache->scale[2];
-                               add_v3_v3v3(add, add, vd.co);
+                               add_v3_v3(add, vd.co);
                                
                                sculpt_clip(sd, ss, vd.co, add);
                                if(vd.mvert) vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
@@ -1257,7 +1257,7 @@ static void calc_flatten_center(Sculpt *sd, SculptSession *ss, PBVHNode **nodes,
        co[0] = co[1] = co[2] = 0.0f;
        for(i = 0; i < FLATTEN_SAMPLE_SIZE; ++i)
                if(outer_dist[i] >= 0.0f)
-                       add_v3_v3v3(co, co, outer_co[i]);
+                       add_v3_v3(co, outer_co[i]);
        mul_v3_fl(co, 1.0f / FLATTEN_SAMPLE_SIZE);
 }
 
@@ -1272,7 +1272,7 @@ static void point_plane_project(float intr[3], float co[3], float plane_normal[3
        sub_v3_v3v3(sub2, co, p1);
        sub_v3_v3v3(intr, co, p1);
        mul_v3_fl(intr, dot_v3v3(plane_normal, sub1) / dot_v3v3(plane_normal, sub2));
-       add_v3_v3v3(intr, intr, p1);
+       add_v3_v3(intr, p1);
 }
 
 static int plane_point_side(float co[3], float plane_normal[3], float plane_center[3], int flip)
@@ -1343,7 +1343,7 @@ static void do_flatten_clay_brush(Sculpt *sd, SculptSession *ss, PBVHNode **node
                                        else
                                                mul_v3_fl(val, fabs(fade));
 
-                                       add_v3_v3v3(val, val, vd.co);
+                                       add_v3_v3(val, vd.co);
 
                                        sculpt_clip(sd, ss, vd.co, val);
                                        if(vd.mvert) vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
@@ -1871,7 +1871,7 @@ int sculpt_stroke_get_location(bContext *C, struct PaintStroke *stroke, float ou
        
        copy_v3_v3(out, ray_normal);
        mul_v3_fl(out, srd.dist);
-       add_v3_v3v3(out, out, ray_start);
+       add_v3_v3(out, ray_start);
 
        return srd.hit;
 }
index 530c203..d16f89e 100644 (file)
@@ -1547,7 +1547,7 @@ static void bone_matrix_translate_y(float mat[][4], float y)
 
        VECCOPY(trans, mat[1]);
        mul_v3_fl(trans, y);
-       add_v3_v3v3(mat[3], mat[3], trans);
+       add_v3_v3(mat[3], trans);
 }
 
 /* assumes object is Armature with pose */
@@ -1917,7 +1917,7 @@ static void get_matrix_editbone(EditBone *eBone, float bmat[][4])
        vec_roll_to_mat3(delta, eBone->roll, mat);
        copy_m4_m3(bmat, mat);
 
-       add_v3_v3v3(bmat[3], bmat[3], eBone->head);
+       add_v3_v3(bmat[3], eBone->head);
 }
 
 static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
index 95ceb1b..d479928 100644 (file)
@@ -4691,8 +4691,8 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
 
                                mul_qt_v3(bevp->quat, vec_a);
                                mul_qt_v3(bevp->quat, vec_b);
-                               add_v3_v3v3(vec_a, vec_a, bevp->vec);
-                               add_v3_v3v3(vec_b, vec_b, bevp->vec);
+                               add_v3_v3(vec_a, bevp->vec);
+                               add_v3_v3(vec_b, bevp->vec);
                                
                                VECSUBFAC(vec_a, vec_a, bevp->dir, fac);
                                VECSUBFAC(vec_b, vec_b, bevp->dir, fac);
index b463d07..d159dc4 100644 (file)
@@ -157,7 +157,7 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
                        if(eve->f & SELECT) {
                                evedef= eve;
                                tot++;
-                               add_v3_v3v3(median, median, eve->co);
+                               add_v3_v3(median, eve->co);
                        }
                        eve= eve->next;
                }
@@ -213,7 +213,7 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
                                a= nu->pntsu;
                                while(a--) {
                                        if(bezt->f2 & SELECT) {
-                                               add_v3_v3v3(median, median, bezt->vec[1]);
+                                               add_v3_v3(median, bezt->vec[1]);
                                                tot++;
                                                median[4]+= bezt->weight;
                                                totweight++;
@@ -222,11 +222,11 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
                                        }
                                        else {
                                                if(bezt->f1 & SELECT) {
-                                                       add_v3_v3v3(median, median, bezt->vec[0]);
+                                                       add_v3_v3(median, bezt->vec[0]);
                                                        tot++;
                                                }
                                                if(bezt->f3 & SELECT) {
-                                                       add_v3_v3v3(median, median, bezt->vec[2]);
+                                                       add_v3_v3(median, bezt->vec[2]);
                                                        tot++;
                                                }
                                        }
@@ -238,7 +238,7 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
                                a= nu->pntsu*nu->pntsv;
                                while(a--) {
                                        if(bp->f1 & SELECT) {
-                                               add_v3_v3v3(median, median, bp->vec);
+                                               add_v3_v3(median, bp->vec);
                                                median[3]+= bp->vec[3];
                                                totw++;
                                                tot++;
@@ -262,7 +262,7 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
                bp= lt->editlatt->def;
                while(a--) {
                        if(bp->f1 & SELECT) {
-                               add_v3_v3v3(median, median, bp->vec);
+                               add_v3_v3(median, bp->vec);
                                tot++;
                                median[4]+= bp->weight;
                                totweight++;
@@ -383,7 +383,7 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
                        eve= em->verts.first;
                        while(eve) {
                                if(eve->f & SELECT) {
-                                       add_v3_v3v3(eve->co, eve->co, median);
+                                       add_v3_v3(eve->co, median);
                                }
                                eve= eve->next;
                        }
@@ -418,18 +418,18 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
                                        a= nu->pntsu;
                                        while(a--) {
                                                if(bezt->f2 & SELECT) {
-                                                       add_v3_v3v3(bezt->vec[0], bezt->vec[0], median);
-                                                       add_v3_v3v3(bezt->vec[1], bezt->vec[1], median);
-                                                       add_v3_v3v3(bezt->vec[2], bezt->vec[2], median);
+                                                       add_v3_v3(bezt->vec[0], median);
+                                                       add_v3_v3(bezt->vec[1], median);
+                                                       add_v3_v3(bezt->vec[2], median);
                                                        bezt->weight+= median[4];
                                                        bezt->radius+= median[5];
                                                }
                                                else {
                                                        if(bezt->f1 & SELECT) {
-                                                               add_v3_v3v3(bezt->vec[0], bezt->vec[0], median);
+                                                               add_v3_v3(bezt->vec[0], median);
                                                        }
                                                        if(bezt->f3 & SELECT) {
-                                                               add_v3_v3v3(bezt->vec[2], bezt->vec[2], median);
+                                                               add_v3_v3(bezt->vec[2], median);
                                                        }
                                                }
                                                bezt++;
@@ -440,7 +440,7 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
                                        a= nu->pntsu*nu->pntsv;
                                        while(a--) {
                                                if(bp->f1 & SELECT) {
-                                                       add_v3_v3v3(bp->vec, bp->vec, median);
+                                                       add_v3_v3(bp->vec, median);
                                                        bp->vec[3]+= median[3];
                                                        bp->weight+= median[4];
                                                        bp->radius+= median[5];
@@ -463,7 +463,7 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
                        bp= lt->editlatt->def;
                        while(a--) {
                                if(bp->f1 & SELECT) {
-                                       add_v3_v3v3(bp->vec, bp->vec, median);
+                                       add_v3_v3(bp->vec, median);
                                        bp->weight+= median[4];
                                }
                                bp++;
index 6f97bc0..a5598dc 100644 (file)
@@ -544,7 +544,7 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y)
                        VECCOPY(rv3d->ofs, vod->ofs);
                        sub_v3_v3v3(rv3d->ofs, rv3d->ofs, vod->dyn_ofs);
                        mul_qt_v3(q1, rv3d->ofs);
-                       add_v3_v3v3(rv3d->ofs, rv3d->ofs, vod->dyn_ofs);
+                       add_v3_v3(rv3d->ofs, vod->dyn_ofs);
                }
        }
        else {
@@ -577,7 +577,7 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y)
                        conjugate_qt(q1); /* conj == inv for unit quat */
                        sub_v3_v3v3(rv3d->ofs, rv3d->ofs, vod->dyn_ofs);
                        mul_qt_v3(q1, rv3d->ofs);
-                       add_v3_v3v3(rv3d->ofs, rv3d->ofs, vod->dyn_ofs);
+                       add_v3_v3(rv3d->ofs, vod->dyn_ofs);
                }
 
                /* Perform the orbital rotation */
@@ -591,7 +591,7 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y)
                        conjugate_qt(q1);
                        sub_v3_v3v3(rv3d->ofs, rv3d->ofs, vod->dyn_ofs);
                        mul_qt_v3(q1, rv3d->ofs);
-                       add_v3_v3v3(rv3d->ofs, rv3d->ofs, vod->dyn_ofs);
+                       add_v3_v3(rv3d->ofs, vod->dyn_ofs);
                }
        }
 
@@ -801,7 +801,7 @@ static void viewmove_apply(ViewOpsData *vod, int x, int y)
                float dvec[3];
 
                window_to_3d_delta(vod->ar, dvec, x-vod->oldx, y-vod->oldy);
-               add_v3_v3v3(vod->rv3d->ofs, vod->rv3d->ofs, dvec);
+               add_v3_v3(vod->rv3d->ofs, dvec);
 
                if(vod->rv3d->viewlock & RV3D_BOXVIEW)
                        view3d_boxview_sync(vod->sa, vod->ar);
@@ -1022,7 +1022,7 @@ static void viewzoom_apply(ViewOpsData *vod, int x, int y, short viewzoom)
                vod->rv3d->dist = vod->dist0;
                copy_m3_m4(mat, vod->rv3d->viewinv);
                mul_m3_v3(mat, upvec);
-               add_v3_v3v3(vod->rv3d->ofs, vod->rv3d->ofs, upvec);
+               add_v3_v3(vod->rv3d->ofs, upvec);
        } else {
                /* these limits were in old code too */
                if(vod->rv3d->dist<0.001*vod->grid) vod->rv3d->dist= 0.001*vod->grid;
@@ -2809,7 +2809,7 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
                upvec[2] = rv3d->dist;
                copy_m3_m4(mat, rv3d->viewinv);
                mul_m3_v3(mat, upvec);
-               add_v3_v3v3(rv3d->ofs, rv3d->ofs, upvec);
+               add_v3_v3(rv3d->ofs, upvec);
        }
 
        /*----------------------------------------------------
@@ -2887,7 +2887,7 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
        dvec[0] = curareaX * rv3d->persinv[0][0] + curareaY * rv3d->persinv[1][0];
        dvec[1] = curareaX * rv3d->persinv[0][1] + curareaY * rv3d->persinv[1][1];
        dvec[2] = curareaX * rv3d->persinv[0][2] + curareaY * rv3d->persinv[1][2];
-       add_v3_v3v3(rv3d->ofs, rv3d->ofs, dvec);
+       add_v3_v3(rv3d->ofs, dvec);
 
        /*----------------------------------------------------
         * ndof device dolly
@@ -2931,7 +2931,7 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
                conjugate_qt(q1); /* conj == inv for unit quat */
                sub_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
                mul_qt_v3(q1, rv3d->ofs);
-               add_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
+               add_v3_v3(rv3d->ofs, obofs);
        }
 
        /* Perform the orbital rotation */
@@ -2956,7 +2956,7 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
                conjugate_qt(q1);
                sub_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
                mul_qt_v3(q1, rv3d->ofs);
-               add_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
+               add_v3_v3(rv3d->ofs, obofs);
        }
 
        /*----------------------------------------------------
index 424ffcc..ab991be 100644 (file)
@@ -122,7 +122,7 @@ static void special_transvert_update(Scene *scene, Object *obedit)
                                                float diffvec[3];
                                                
                                                sub_v3_v3v3(diffvec, tv->loc, tv->oldloc);
-                                               add_v3_v3v3(ebo->tail, ebo->tail, diffvec);
+                                               add_v3_v3(ebo->tail, diffvec);
                                                
                                                a++;
                                                if (a<tottrans) tv++;
@@ -448,7 +448,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *op)
                        
                        VECCOPY(vec, tv->loc);
                        mul_m3_v3(bmat, vec);
-                       add_v3_v3v3(vec, vec, obedit->obmat[3]);
+                       add_v3_v3(vec, obedit->obmat[3]);
                        vec[0]= gridf*floor(.5+ vec[0]/gridf);
                        vec[1]= gridf*floor(.5+ vec[1]/gridf);
                        vec[2]= gridf*floor(.5+ vec[2]/gridf);
@@ -744,8 +744,8 @@ static int snap_curs_to_sel(bContext *C, wmOperator *op)
                for(a=0; a<tottrans; a++, tv++) {
                        VECCOPY(vec, tv->loc);
                        mul_m3_v3(bmat, vec);
-                       add_v3_v3v3(vec, vec, obedit->obmat[3]);
-                       add_v3_v3v3(centroid, centroid, vec);
+                       add_v3_v3(vec, obedit->obmat[3]);
+                       add_v3_v3(centroid, vec);
                        DO_MINMAX(vec, min, max);
                }
                
@@ -772,7 +772,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *op)
                                        if(pchan->bone->flag & BONE_SELECTED) {
                                                VECCOPY(vec, pchan->pose_head);
                                                mul_m4_v3(ob->obmat, vec);
-                                               add_v3_v3v3(centroid, centroid, vec);
+                                               add_v3_v3(centroid, vec);
                                                DO_MINMAX(vec, min, max);
                                                count++;
                                        }
@@ -782,7 +782,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *op)
                else {
                        CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
                                VECCOPY(vec, ob->obmat[3]);
-                               add_v3_v3v3(centroid, centroid, vec);
+                               add_v3_v3(centroid, vec);
                                DO_MINMAX(vec, min, max);
                                count++;
                        }
@@ -927,8 +927,8 @@ int minmax_verts(Object *obedit, float *min, float *max)
        for(a=0; a<tottrans; a++, tv++) {               
                VECCOPY(vec, tv->loc);
                mul_m3_v3(bmat, vec);
-               add_v3_v3v3(vec, vec, obedit->obmat[3]);
-               add_v3_v3v3(centroid, centroid, vec);
+               add_v3_v3(vec, obedit->obmat[3]);
+               add_v3_v3(centroid, vec);
                DO_MINMAX(vec, min, max);               
        }
        
index 78e6d5f..e959908 100644 (file)
@@ -2174,7 +2174,7 @@ static int flyEnd(bContext *C, FlyInfo *fly)
                upvec[2]= fly->dist_backup; /*x and y are 0*/
                copy_m3_m4(mat, rv3d->viewinv);
                mul_m3_v3(mat, upvec);
-               add_v3_v3v3(rv3d->ofs, rv3d->ofs, upvec);
+               add_v3_v3(rv3d->ofs, upvec);
                /*Done with correcting for the dist */
        }
 
@@ -2544,7 +2544,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
                                if (lock_ob->protectflag & OB_LOCK_LOCZ) dvec[2] = 0.0;
                        }
 
-                       add_v3_v3v3(rv3d->ofs, rv3d->ofs, dvec);
+                       add_v3_v3(rv3d->ofs, dvec);
 
                        /* todo, dynamic keys */
 #if 0
index 3539cf9..09e196c 100644 (file)
@@ -2389,7 +2389,7 @@ int Shear(TransInfo *t, short mval[2])
                
                mul_m3_v3(tmat, vec);
                
-               add_v3_v3v3(vec, vec, t->center);
+               add_v3_v3(vec, t->center);
                sub_v3_v3v3(vec, vec, td->center);
                
                mul_v3_fl(vec, td->factor);
@@ -2569,7 +2569,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
        
        mul_m3_v3(tmat, vec);
        
-       add_v3_v3v3(vec, vec, center);
+       add_v3_v3(vec, center);
        if (t->flag & T_POINTS)
                sub_v3_v3v3(vec, vec, td->iloc);
        else
@@ -2861,7 +2861,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
                        mul_m3_v3(mat, vec);            // Applying rotation
                        mul_m3_v3(imtx, vec);   // To Local space
                        
-                       add_v3_v3v3(vec, vec, center);
+                       add_v3_v3(vec, center);
                        /* vec now is the location where the object has to be */
                        
                        sub_v3_v3v3(vec, vec, td->center); // Translation needed from the initial location
@@ -2933,7 +2933,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
                        /* translation */
                        sub_v3_v3v3(vec, td->center, center);
                        mul_m3_v3(mat, vec);
-                       add_v3_v3v3(vec, vec, center);
+                       add_v3_v3(vec, center);
                        /* vec now is the location where the object has to be */
                        sub_v3_v3v3(vec, vec, td->center);
                        mul_m3_v3(td->smtx, vec);
@@ -4482,7 +4482,7 @@ static int createSlideVerts(TransInfo *t)
                                        sub_v3_v3v3(vec, co2, co);
                                }
 
-                               add_v3_v3v3(start, start, vec);
+                               add_v3_v3(start, vec);
 
                                if (v3d) {
                                        view3d_project_float(t->ar, tempsv->down->v1->co, co, projectMat);
@@ -4495,7 +4495,7 @@ static int createSlideVerts(TransInfo *t)
                                        sub_v3_v3v3(vec, co, co2);
                                }
 
-                               add_v3_v3v3(end, end, vec);
+                               add_v3_v3(end, vec);
 
                                totvec += 1.0f;
                                nearest = (EditVert*)look->link;
@@ -4507,7 +4507,7 @@ static int createSlideVerts(TransInfo *t)
                look = look->next;
        }
 
-       add_v3_v3v3(start, start, end);
+       add_v3_v3(start, end);
        mul_v3_fl(start, 0.5*(1.0/totvec));
        VECCOPY(vec, start);
        start[0] = t->mval[0];
index b32fb9d..c2f57be 100644 (file)
@@ -620,7 +620,7 @@ void drawConstraint(const struct bContext *C, TransInfo *t)
                        float vec[3];
                        char col2[3] = {255,255,255};
                        convertViewVec(t, vec, (short)(t->mval[0] - t->con.imval[0]), (short)(t->mval[1] - t->con.imval[1]));
-                       add_v3_v3v3(vec, vec, tc->center);
+                       add_v3_v3(vec, tc->center);
 
                        drawLine(t, tc->center, tc->mtx[0], 'x', 0);
                        drawLine(t, tc->center, tc->mtx[1], 'y', 0);
@@ -852,7 +852,7 @@ static void setNearestAxis3d(TransInfo *t)
 
                mul_v3_fl(axis, zfac);
                /* now we can project to get window coordinate */
-               add_v3_v3v3(axis, axis, t->con.center);
+               add_v3_v3(axis, t->con.center);
                projectIntView(t, axis, icoord);
 
                axis[0] = (float)(icoord[0] - t->center2d[0]);
index 41914ed..59961f5 100644 (file)
@@ -1276,7 +1276,7 @@ void calculateCenterMedian(TransInfo *t)
                if (t->data[i].flag & TD_SELECTED) {
                        if (!(t->data[i].flag & TD_NOCENTER))
                        {
-                               add_v3_v3v3(partial, partial, t->data[i].center);
+                               add_v3_v3(partial, t->data[i].center);
                                total++;
                        }
                }
index b11f35d..016aca2 100644 (file)
@@ -122,7 +122,7 @@ static void calc_tw_center(Scene *scene, float *co)
        float *max= scene->twmax;
 
        DO_MINMAX(co, min, max);
-       add_v3_v3v3(twcent, twcent, co);
+       add_v3_v3(twcent, co);
 }
 
 static void protectflag_to_drawflags(short protectflag, short *drawflags)
index d509ce9..e18f7fc 100644 (file)
@@ -725,7 +725,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
                                        for (eve = em->verts.first; eve; eve = eve->next)
                                        {
                                                if ( eve->f & SELECT ) {
-                                                       add_v3_v3v3(normal, normal, eve->no);
+                                                       add_v3_v3(normal, eve->no);
                                                }
                                        }
                                        normalize_v3(normal);
@@ -832,10 +832,10 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
                                                float vec[3];
                                                sub_v3_v3v3(vec, ebone->tail, ebone->head);
                                                normalize_v3(vec);
-                                               add_v3_v3v3(normal, normal, vec);
+                                               add_v3_v3(normal, vec);
                                                
                                                vec_roll_to_mat3(vec, ebone->roll, mat);
-                                               add_v3_v3v3(plane, plane, mat[2]);
+                                               add_v3_v3(plane, mat[2]);
                                        }
                                }
                        }
@@ -875,8 +875,8 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
                        /* use channels to get stats */
                        for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
                                if (pchan->bone && pchan->bone->flag & BONE_TRANSFORM) {
-                                       add_v3_v3v3(normal, normal, pchan->pose_mat[2]);
-                                       add_v3_v3v3(plane, plane, pchan->pose_mat[1]);
+                                       add_v3_v3(normal, pchan->pose_mat[2]);
+                                       add_v3_v3(plane, pchan->pose_mat[1]);
                                }
                        }
                        negate_v3(plane);
index b49e1b0..9d8057c 100644 (file)
@@ -279,7 +279,7 @@ void applyProject(TransInfo *t)
                                
                                mul_m3_v3(td->smtx, tvec);
                                
-                               add_v3_v3v3(td->loc, td->loc, tvec);
+                               add_v3_v3(td->loc, tvec);
                        }
                        
                        //XXX constraintTransLim(t, td);
@@ -912,7 +912,7 @@ void TargetSnapMedian(TransInfo *t)
                
                for(td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
                {
-                       add_v3_v3v3(t->tsnap.snapTarget, t->tsnap.snapTarget, td->center);
+                       add_v3_v3(t->tsnap.snapTarget, td->center);
                }
                
                mul_v3_fl(t->tsnap.snapTarget, 1.0 / i);
@@ -1030,7 +1030,7 @@ int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4
                
                VECCOPY(intersect, ray_normal_local);
                mul_v3_fl(intersect, lambda);
-               add_v3_v3v3(intersect, intersect, ray_start_local);
+               add_v3_v3(intersect, ray_start_local);
                
                VECCOPY(location, intersect);
                
@@ -1730,7 +1730,7 @@ int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta
                                        
                                        VECCOPY(intersect, ray_normal_local);
                                        mul_v3_fl(intersect, lambda);
-                                       add_v3_v3v3(intersect, intersect, ray_start_local);
+                                       add_v3_v3(intersect, ray_start_local);
                                        
                                        VECCOPY(location, intersect);
                                        
@@ -1760,7 +1760,7 @@ int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta
                                                
                                                VECCOPY(intersect, ray_normal_local);
                                                mul_v3_fl(intersect, lambda);
-                                               add_v3_v3v3(intersect, intersect, ray_start_local);
+                                               add_v3_v3(intersect, ray_start_local);
                                                
                                                VECCOPY(location, intersect);
                                                
index 9dfa093..259b7a9 100644 (file)
@@ -3190,11 +3190,11 @@ static float p_face_stretch(PFace *f)
 
        copy_v3_v3(tmp, v2->co);
        mul_v3_fl(tmp, (v3->uv[1] - v1->uv[1]));
-       add_v3_v3v3(Ps, Ps, tmp);
+       add_v3_v3(Ps, tmp);
 
        copy_v3_v3(tmp, v3->co);
        mul_v3_fl(tmp, (v1->uv[1] - v2->uv[1]));
-       add_v3_v3v3(Ps, Ps, tmp);
+       add_v3_v3(Ps, tmp);
 
        mul_v3_fl(Ps, w);
 
@@ -3203,11 +3203,11 @@ static float p_face_stretch(PFace *f)
 
        copy_v3_v3(tmp, v2->co);
        mul_v3_fl(tmp, (v1->uv[0] - v3->uv[0]));
-       add_v3_v3v3(Pt, Pt, tmp);
+       add_v3_v3(Pt, tmp);
 
        copy_v3_v3(tmp, v3->co);
        mul_v3_fl(tmp, (v2->uv[0] - v1->uv[0]));
-       add_v3_v3v3(Pt, Pt, tmp);
+       add_v3_v3(Pt, tmp);
 
        mul_v3_fl(Pt, w);
 
index 447862b..505fcdc 100644 (file)
@@ -225,7 +225,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
        maxVerts = dm->getNumVerts(dm);
 
        if(amd->offset_type & MOD_ARR_OFF_CONST)
-               add_v3_v3v3(offset[3], offset[3], amd->offset);
+               add_v3_v3(offset[3], amd->offset);
        if(amd->offset_type & MOD_ARR_OFF_RELATIVE) {
                for(j = 0; j < 3; j++)
                        offset[3][j] += amd->scale[j] * vertarray_size(src_mvert,
index 3f97dfc..b745d39 100644 (file)
@@ -243,7 +243,7 @@ static void sphere_do(
                                if(flag & MOD_CAST_USE_OB_TRANSFORM) {
                                        mul_m4_v3(imat, tmp_co);
                                } else {
-                                       add_v3_v3v3(tmp_co, tmp_co, center);
+                                       add_v3_v3(tmp_co, center);
                                }
                        }
 
@@ -287,7 +287,7 @@ static void sphere_do(
                        if(flag & MOD_CAST_USE_OB_TRANSFORM) {
                                mul_m4_v3(imat, tmp_co);
                        } else {
-                               add_v3_v3v3(tmp_co, tmp_co, center);
+                               add_v3_v3(tmp_co, center);
                        }
                }
 
@@ -489,7 +489,7 @@ static void cuboid_do(
                                if(flag & MOD_CAST_USE_OB_TRANSFORM) {
                                        mul_m4_v3(imat, tmp_co);
                                } else {
-                                       add_v3_v3v3(tmp_co, tmp_co, center);
+                                       add_v3_v3(tmp_co, center);
                                }
                        }
 
@@ -557,7 +557,7 @@ static void cuboid_do(
                        if(flag & MOD_CAST_USE_OB_TRANSFORM) {
                                mul_m4_v3(imat, tmp_co);
                        } else {
-                               add_v3_v3v3(tmp_co, tmp_co, center);
+                               add_v3_v3(tmp_co, center);
                        }
                }
 
index 12f46d0..a45ee19 100644 (file)
@@ -149,9 +149,9 @@ static void createFacepa(ExplodeModifierData *emd,
        /* set face-particle-indexes to nearest particle to face center */
        for(i=0,fa=mface; i<totface; i++,fa++){
                add_v3_v3v3(center,mvert[fa->v1].co,mvert[fa->v2].co);
-               add_v3_v3v3(center,center,mvert[fa->v3].co);
+               add_v3_v3(center, mvert[fa->v3].co);
                if(fa->v4){
-                       add_v3_v3v3(center,center,mvert[fa->v4].co);
+                       add_v3_v3(center, mvert[fa->v4].co);
                        mul_v3_fl(center,0.25);
                }
                else
index 052d464..a42bf8a 100644 (file)
@@ -144,11 +144,11 @@ static void smoothModifier_do(
 
                        if (uctmp[idx1] < 255) {
                                uctmp[idx1]++;
-                               add_v3_v3v3(v1, v1, fvec);
+                               add_v3_v3(v1, fvec);
                        }
                        if (uctmp[idx2] < 255) {
                                uctmp[idx2]++;
-                               add_v3_v3v3(v2, v2, fvec);
+                               add_v3_v3(v2, fvec);
                        }
                }
 
index 189c029..f6d08db 100644 (file)
@@ -1041,7 +1041,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
                vlr->v4= RE_findOrAddVert(obr, obr->totvert++);
                
                VECCOPY(vlr->v1->co, vec);
-               add_v3_v3v3(vlr->v1->co, vlr->v1->co, cross);
+               add_v3_v3(vlr->v1->co, cross);
                VECCOPY(vlr->v1->n, nor);
                vlr->v1->orco= sd->orco;
                vlr->v1->accum= -1.0f;  // accum abuse for strand texco
@@ -1053,7 +1053,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
                vlr->v2->accum= vlr->v1->accum;
 
                VECCOPY(vlr->v4->co, vec1);
-               add_v3_v3v3(vlr->v4->co, vlr->v4->co, cross);
+               add_v3_v3(vlr->v4->co, cross);
                VECCOPY(vlr->v4->n, nor);
                vlr->v4->orco= sd->orco;
                vlr->v4->accum= 1.0f;   // accum abuse for strand texco
@@ -1115,7 +1115,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
                v2= RE_findOrAddVert(obr, obr->totvert++);
                
                VECCOPY(v1->co, vec);
-               add_v3_v3v3(v1->co, v1->co, cross);
+               add_v3_v3(v1->co, cross);
                VECCOPY(v1->n, nor);
                v1->orco= sd->orco;
                v1->accum= -1.0f;       // accum abuse for strand texco
@@ -1177,7 +1177,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
                }
        
                VECCOPY(vlr->v4->co, vec);
-               add_v3_v3v3(vlr->v4->co, vlr->v4->co, cross);
+               add_v3_v3(vlr->v4->co, cross);
                VECCOPY(vlr->v4->n, nor);
                vlr->v4->orco= sd->orco;
                vlr->v4->accum= -1.0f + 2.0f*sd->time;  // accum abuse for strand texco
@@ -2544,10 +2544,10 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
                                vlr->flag |= R_NOPUNOFLIP;
                        }
                        
-                       add_v3_v3v3(v1->n, v1->n, n1);
-                       add_v3_v3v3(v2->n, v2->n, n1);
-                       add_v3_v3v3(v3->n, v3->n, n1);
-                       add_v3_v3v3(v4->n, v4->n, n1);
+                       add_v3_v3(v1->n, n1);
+                       add_v3_v3(v2->n, n1);
+                       add_v3_v3(v3->n, n1);
+                       add_v3_v3(v4->n, n1);
                        
                        p1++; p2++; p3++; p4++;
                }
@@ -2561,10 +2561,10 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
                        /* optimize! :*/
                        vlr= RE_findOrAddVlak(obr, UVTOINDEX(sizeu - 1, v));
                        vlr1= RE_findOrAddVlak(obr, UVTOINDEX(0, v));
-                       add_v3_v3v3(vlr1->v1->n, vlr1->v1->n, vlr->n);
-                       add_v3_v3v3(vlr1->v2->n, vlr1->v2->n, vlr->n);
-                       add_v3_v3v3(vlr->v3->n, vlr->v3->n, vlr1->n);
-                       add_v3_v3v3(vlr->v4->n, vlr->v4->n, vlr1->n);
+                       add_v3_v3(vlr1->v1->n, vlr->n);
+                       add_v3_v3(vlr1->v2->n, vlr->n);
+                       add_v3_v3(vlr->v3->n, vlr1->n);
+                       add_v3_v3(vlr->v4->n, vlr1->n);
                }
        }
        if (dl->flag & DL_CYCL_U) {
@@ -2574,10 +2574,10 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
                        /* optimize! :*/
                        vlr= RE_findOrAddVlak(obr, UVTOINDEX(u, 0));
                        vlr1= RE_findOrAddVlak(obr, UVTOINDEX(u, sizev-1));
-                       add_v3_v3v3(vlr1->v2->n, vlr1->v2->n, vlr->n);
-                       add_v3_v3v3(vlr1->v3->n, vlr1->v3->n, vlr->n);
-                       add_v3_v3v3(vlr->v1->n, vlr->v1->n, vlr1->n);
-                       add_v3_v3v3(vlr->v4->n, vlr->v4->n, vlr1->n);
+                       add_v3_v3(vlr1->v2->n, vlr->n);
+                       add_v3_v3(vlr1->v3->n, vlr->n);
+                       add_v3_v3(vlr->v1->n, vlr1->n);
+                       add_v3_v3(vlr->v4->n, vlr1->n);
                }
        }
        /* last vertex is an extra case: 
@@ -2603,9 +2603,9 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
                vlr1= RE_findOrAddVlak(obr, UVTOINDEX(0,0));  /* (0,0) */
                add_v3_v3v3(n1, vlr->n, vlr1->n);
                vlr2= RE_findOrAddVlak(obr, UVTOINDEX(0, sizev-1)); /* (0,n) */
-               add_v3_v3v3(n1, n1, vlr2->n);
+               add_v3_v3(n1, vlr2->n);
                vlr3= RE_findOrAddVlak(obr, UVTOINDEX(sizeu-1, 0)); /* (m,0) */
-               add_v3_v3v3(n1, n1, vlr3->n);
+               add_v3_v3(n1, vlr3->n);
                VECCOPY(vlr->v3->n, n1);
                VECCOPY(vlr1->v1->n, n1);
                VECCOPY(vlr2->v2->n, n1);
@@ -2986,10 +2986,10 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
                                                for(a= startvlak; a<obr->totvlak; a++) {
                                                        vlr= RE_findOrAddVlak(obr, a);
 
-                                                       add_v3_v3v3(vlr->v1->n, vlr->v1->n, vlr->n);
-                                                       add_v3_v3v3(vlr->v3->n, vlr->v3->n, vlr->n);
-                                                       add_v3_v3v3(vlr->v2->n, vlr->v2->n, vlr->n);
-                                                       add_v3_v3v3(vlr->v4->n, vlr->v4->n, vlr->n);
+                                                       add_v3_v3(vlr->v1->n, vlr->n);
+                                                       add_v3_v3(vlr->v3->n, vlr->n);
+                                                       add_v3_v3(vlr->v2->n, vlr->n);
+                                                       add_v3_v3(vlr->v4->n, vlr->n);
                                                }
                                                for(a=startvert; a<obr->totvert; a++) {
                                                        ver= RE_findOrAddVert(obr, a);
index 1a34868..3ab03aa 100644 (file)
@@ -719,7 +719,7 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe
        
                        texr1.nor= texr2.nor= NULL;
 
-                       add_v3_v3v3(vec, vec, dxt);
+                       add_v3_v3(vec, dxt);
                        face1= envcube_isect(env, vec, sco);
                        sub_v3_v3v3(vec, vec, dxt);
                        
@@ -732,7 +732,7 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe
                        
                        /* here was the nasty bug! results were not zero-ed. FPE! */
                        
-                       add_v3_v3v3(vec, vec, dyt);
+                       add_v3_v3(vec, dyt);
                        face1= envcube_isect(env, vec, sco);
                        sub_v3_v3v3(vec, vec, dyt);
                        
index 0159222..b184b68 100644 (file)
@@ -1310,7 +1310,7 @@ static void trace_refract(float *col, ShadeInput *shi, ShadeResult *shr)
                                
                        /* and perturb the refraction vector in it */
                        add_v3_v3v3(v_refract_new, v_refract, orthx);
-                       add_v3_v3v3(v_refract_new, v_refract_new, orthy);
+                       add_v3_v3(v_refract_new, orthy);
                        
                        normalize_v3(v_refract_new);
                } else {
@@ -1405,7 +1405,7 @@ static void trace_reflect(float *col, ShadeInput *shi, ShadeResult *shr, float f
 
                        /* and perturb the normal in it */
                        add_v3_v3v3(v_nor_new, shi->vn, orthx);
-                       add_v3_v3v3(v_nor_new, v_nor_new, orthy);
+                       add_v3_v3(v_nor_new, orthy);
                        normalize_v3(v_nor_new);
                } else {
                        /* no blurriness, use the original normal */
@@ -1728,7 +1728,7 @@ static void DS_energy(float *sphere, int tot, float *vec)
        }
 
        mul_v3_fl(res, 0.5);
-       add_v3_v3v3(vec, vec, res);
+       add_v3_v3(vec, res);
        normalize_v3(vec);
        
 }
index 99c27aa..142bef7 100644 (file)
@@ -455,7 +455,7 @@ static void vol_get_transmittance(ShadeInput *shi, float *tr, float *co, float *
                tau[1] += stepd * sigma_t[1];
                tau[2] += stepd * sigma_t[2];
                
-               add_v3_v3v3(p, p, step_vec);
+               add_v3_v3(p, step_vec);
        }
        
        /* return transmittance */
@@ -561,7 +561,7 @@ void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co)
                
                if (lar) {
                        vol_shade_one_lamp(shi, co, lar, lacol);
-                       add_v3_v3v3(scatter_col, scatter_col, lacol);
+                       add_v3_v3(scatter_col, lacol);
                }
        }
 }
@@ -631,12 +631,12 @@ static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float
                        radiance[1] += stepd * tr[1] * (emit_col[1] + scatter_col[1]);
                        radiance[2] += stepd * tr[2] * (emit_col[2] + scatter_col[2]);
                }
-               add_v3_v3v3(p, p, step_vec);
+               add_v3_v3(p, step_vec);
        }
        
        /* multiply original color (from behind volume) with transmittance over entire distance */
        mul_v3_v3v3(col, tr, col);
-       add_v3_v3v3(col, col, radiance);
+       add_v3_v3(col, radiance);
        
        /* alpha <-- transmission luminance */
        col[3] = 1.0f - luminance(tr);
index 762848c..3ac806f 100644 (file)
@@ -339,7 +339,7 @@ int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres)
         * to the range 0.0, 1.0, before looking up in the voxel structure. */
        copy_v3_v3(co, texvec);
        mul_v3_fl(co, 0.5f);
-       add_v3_v3v3(co, co, offset);
+       add_v3_v3(co, offset);
 
        /* co is now in the range 0.0, 1.0 */
        switch (tex->extend) {