Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-04-21 16:27:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-21 16:27:48 +0400
commitfba7ebcbea35d3b14f535f7f7a50c61074ae7092 (patch)
tree91045bfb888e38b02b109b6174c8b93102b649d2 /source/blender/editors
parentf7717b2e80907a974b472d0ee786f63b06efa40c (diff)
replace add_v3_v3v3() --> add_v3_v3() where possible
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/armature/editarmature.c10
-rw-r--r--source/blender/editors/armature/editarmature_generate.c4
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c6
-rw-r--r--source/blender/editors/armature/meshlaplacian.c8
-rw-r--r--source/blender/editors/armature/reeb.c8
-rw-r--r--source/blender/editors/curve/editcurve.c10
-rw-r--r--source/blender/editors/mesh/editmesh_add.c2
-rw-r--r--source/blender/editors/mesh/editmesh_lib.c10
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c6
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c6
-rw-r--r--source/blender/editors/mesh/meshtools.c6
-rw-r--r--source/blender/editors/object/object_hook.c14
-rw-r--r--source/blender/editors/physics/particle_edit.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c16
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c20
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c4
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c28
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c18
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c16
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c4
-rw-r--r--source/blender/editors/transform/transform.c14
-rw-r--r--source/blender/editors/transform/transform_constraints.c4
-rw-r--r--source/blender/editors/transform/transform_generics.c2
-rw-r--r--source/blender/editors/transform/transform_manipulator.c2
-rw-r--r--source/blender/editors/transform/transform_orientations.c10
-rw-r--r--source/blender/editors/transform/transform_snap.c10
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c8
28 files changed, 128 insertions, 128 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 58819546ec1..6363732de8d 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -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;
}
diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c
index a7f79bb6ff3..d432b2fa653 100644
--- a/source/blender/editors/armature/editarmature_generate.c
+++ b/source/blender/editors/armature/editarmature_generate.c
@@ -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 */
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index e9ad91c19e3..307abe809ec 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -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);
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 4f0805cd0d6..700f4573e3a 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -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)
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index 04bf5bce553..8842e08d5eb 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -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
}
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 16df00664e0..32572da573d 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -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);
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 3a57dab2c10..857423f8ab3 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -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;
}
}
diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c
index 7236c34d6f5..2fc8452f734 100644
--- a/source/blender/editors/mesh/editmesh_lib.c
+++ b/source/blender/editors/mesh/editmesh_lib.c
@@ -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 */
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index 3a5d5380089..e82c289a6ea 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -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;
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index b66fa6da06c..6b8d0522f2b 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -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++;
}
}
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 0d2d39f938f..99bca7e9073 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -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 */
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 624b4985f97..eba6db6bb79 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -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++;
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index b45b06d2a39..084b4c1320d 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -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);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 40bc4dc4c87..2da638fca41 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -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
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 509a1bcc61e..85c33500c5d 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -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;
}
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 530c203ed7e..d16f89e5785 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -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)
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 95ceb1b1b11..d47992810f3 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -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);
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index b463d07677b..d159dc487a7 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -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++;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 6f97bc04395..a5598dc9d0c 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -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);
}
/*----------------------------------------------------
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 424ffcc6ef8..ab991be7dad 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -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);
}
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 78e6d5f5439..e9599089419 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -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
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 3539cf9562e..09e196c6d1a 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -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];
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index b32fb9d5fd7..c2f57be2453 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -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]);
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 41914ed4135..59961f5812c 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -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++;
}
}
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index b11f35dd363..016aca2b7ec 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -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)
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index d509ce97015..e18f7fc05ce 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -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);
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index b49e1b05de3..9d8057caea6 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -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);
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 9dfa0934ad2..259b7a95492 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -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);