From 3e76e544badd1621cadf65b087a7f8e2d882a955 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 12 Sep 2011 05:51:35 +0000 Subject: [PATCH] replace VECCOPY with copy_v3_v3 --- .../blenkernel/intern/editderivedbmesh.c | 6 +-- source/blender/bmesh/intern/bmesh_polygon.c | 46 +++++++++---------- source/blender/editors/mesh/bmesh_tools.c | 22 ++++----- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/source/blender/blenkernel/intern/editderivedbmesh.c b/source/blender/blenkernel/intern/editderivedbmesh.c index b8f347b9c1c..29415d4583f 100644 --- a/source/blender/blenkernel/intern/editderivedbmesh.c +++ b/source/blender/blenkernel/intern/editderivedbmesh.c @@ -1187,7 +1187,7 @@ static int bmDM_getNumFaces(DerivedMesh *dm) static int bmvert_to_mvert(BMesh *bm, BMVert *ev, MVert *vert_r) { - VECCOPY(vert_r->co, ev->co); + copy_v3_v3(vert_r->co, ev->co); vert_r->no[0] = (short)(ev->no[0] * 32767.0f); vert_r->no[1] = (short)(ev->no[1] * 32767.0f); @@ -1278,7 +1278,7 @@ static void bmDM_copyVertArray(DerivedMesh *dm, MVert *vert_r) ev = BMIter_New(&iter, bm, BM_VERTS_OF_MESH, NULL); for( ; ev; ev = BMIter_Step(&iter), ++vert_r) { - VECCOPY(vert_r->co, ev->co); + copy_v3_v3(vert_r->co, ev->co); vert_r->no[0] = (short) (ev->no[0] * 32767.0); vert_r->no[1] = (short) (ev->no[1] * 32767.0); @@ -1638,7 +1638,7 @@ DerivedMesh *getEditDerivedBMesh(BMEditMesh *em, Object *UNUSED(ob), /* following Mesh convention; we use vertex coordinate itself * for normal in this case */ if (normalize_v3(no)==0.0) { - VECCOPY(no, vertexCos[i]); + copy_v3_v3(no, vertexCos[i]); normalize_v3(no); } } diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index fc6abd724cf..8ff324cd915 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -101,9 +101,9 @@ static void compute_poly_normal(float normal[3], float (*verts)[3], int nverts) verts[0][2] += 0.0001f; for(i = 0; i < nverts; i++){ - VECCOPY(u, verts[i]); - VECCOPY(v, verts[(i+1) % nverts]); - VECCOPY(w, verts[(i+2) % nverts]); + copy_v3_v3(u, verts[i]); + copy_v3_v3(v, verts[(i+1) % nverts]); + copy_v3_v3(w, verts[(i+2) % nverts]); #if 0 VECSUB(v1, w, v); @@ -221,7 +221,7 @@ float BM_face_area(BMFace *f) i = 0; BM_ITER(l, &iter, NULL, BM_LOOPS_OF_FACE, f) { - VECCOPY(verts[i], l->v->co); + copy_v3_v3(verts[i], l->v->co); i++; } @@ -301,7 +301,7 @@ void compute_poly_plane(float (*verts)[3], int nverts) for(i = 0; i < nverts; i++){ v1 = verts[i]; - VECCOPY(temp, v1); + copy_v3_v3(temp, v1); mag = 0.0; mag += (temp[0] * avgn[0]); mag += (temp[1] * avgn[1]); @@ -408,7 +408,7 @@ void BM_Face_UpdateNormal(BMesh *bm, BMFace *f) if (f->len < 3) return; BM_ITER(l, &iter, bm, BM_LOOPS_OF_FACE, f) { - VECCOPY(proj[i], l->v->co); + copy_v3_v3(proj[i], l->v->co); i += 1; } @@ -477,7 +477,7 @@ void bmesh_update_face_normal(BMesh *bm, BMFace *f, float (*projectverts)[3]) if(f->len > 4) { i = 0; BM_ITER(l, &iter, bm, BM_LOOPS_OF_FACE, f) { - VECCOPY(projectverts[i], l->v->co); + copy_v3_v3(projectverts[i], l->v->co); l = l->next; i += 1; } @@ -758,7 +758,7 @@ void BM_Triangulate_Face(BMesh *bm, BMFace *f, float (*projectverts)[3], i = 0; l = bm_firstfaceloop(f); do{ - VECCOPY(projectverts[i], l->v->co); + copy_v3_v3(projectverts[i], l->v->co); BM_SetIndex(l->v, i); i++; l = (BMLoop*)(l->next); @@ -786,7 +786,7 @@ void BM_Triangulate_Face(BMesh *bm, BMFace *f, float (*projectverts)[3], f = BM_Split_Face(bm, l->f, ((BMLoop*)(l->prev))->v, ((BMLoop*)(l->next))->v, &newl, NULL); - VECCOPY(f->no, l->f->no); + copy_v3_v3(f->no, l->f->no); if (!f) { printf("yeek! triangulator failed to split face!\n"); @@ -861,19 +861,19 @@ void BM_LegalSplits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len) l = BMIter_New(&iter, bm, BM_LOOPS_OF_FACE, f); for (; l; l=BMIter_Step(&iter)) { BM_SetIndex(l, i); - VECCOPY(projverts[i], l->v->co); + copy_v3_v3(projverts[i], l->v->co); i++; } for (i=0; iv->co); - VECCOPY(v2, loops[i][1]->v->co); + copy_v3_v3(v1, loops[i][0]->v->co); + copy_v3_v3(v2, loops[i][1]->v->co); shrink_edgef(v1, v2, fac2); - VECCOPY(edgeverts[a], v1); + copy_v3_v3(edgeverts[a], v1); a++; - VECCOPY(edgeverts[a], v2); + copy_v3_v3(edgeverts[a], v2); a++; } @@ -889,7 +889,7 @@ void BM_LegalSplits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len) out[2] = 0.0f; p1[2] = 0.0f; - //VECCOPY(l->v->co, p1); + //copy_v3_v3(l->v->co, p1); l = (BMLoop*) l->next; } @@ -901,8 +901,8 @@ void BM_LegalSplits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len) /*do convexity test*/ for (i=0; ilen]; - VECCOPY(v1, p1); - VECCOPY(v2, p2); + copy_v3_v3(v1, p1); + copy_v3_v3(v2, p2); shrink_edgef(v1, v2, fac1); @@ -929,8 +929,8 @@ void BM_LegalSplits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len) p1 = projverts[i]; p2 = projverts[(i+1)%f->len]; - VECCOPY(v1, p1); - VECCOPY(v2, p2); + copy_v3_v3(v1, p1); + copy_v3_v3(v2, p2); shrink_edgef(v1, v2, fac1); @@ -958,8 +958,8 @@ void BM_LegalSplits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len) p3 = edgeverts[j*2]; p4 = edgeverts[j*2+1]; - VECCOPY(v1, p1); - VECCOPY(v2, p2); + copy_v3_v3(v1, p1); + copy_v3_v3(v2, p2); shrink_edgef(v1, v2, fac1); diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c index 80de84b3cf8..3d7632ae6e4 100644 --- a/source/blender/editors/mesh/bmesh_tools.c +++ b/source/blender/editors/mesh/bmesh_tools.c @@ -214,7 +214,7 @@ static short EDBM_Extrude_face_indiv(BMEditMesh *em, wmOperator *op, short flag, /*set face vertex normals to face normal*/ BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, f) { - VECCOPY(l->v->no, f->no); + copy_v3_v3(l->v->no, f->no); } } @@ -262,13 +262,13 @@ short EDBM_Extrude_face_indiv(BMEditMesh *em, wmOperator *op, short flag, float v3= addvertlist(em, efa->v3->co, efa->v3); v1->f1= v2->f1= v3->f1= 1; - VECCOPY(v1->no, efa->n); - VECCOPY(v2->no, efa->n); - VECCOPY(v3->no, efa->n); + copy_v3_v3(v1->no, efa->n); + copy_v3_v3(v2->no, efa->n); + copy_v3_v3(v3->no, efa->n); if(efa->v4) { v4= addvertlist(em, efa->v4->co, efa->v4); v4->f1= 1; - VECCOPY(v4->no, efa->n); + copy_v3_v3(v4->no, efa->n); } else v4= NULL; @@ -2241,7 +2241,7 @@ static int merge_target(BMEditMesh *em, Scene *scene, View3D *v3d, Object *ob, if (target) { vco = give_cursor(scene, v3d); - VECCOPY(co, vco); + copy_v3_v3(co, vco); mul_m4_v3(ob->imat, co); } else { @@ -2919,7 +2919,7 @@ static void shape_propagate(Object *obedit, BMEditMesh *em, wmOperator *op) for (i=0; ibm->vdata, eve->head.data, CD_SHAPEKEY, i); - VECCOPY(co, eve->co); + copy_v3_v3(co, eve->co); } } @@ -2990,7 +2990,7 @@ static int blend_from_shape_exec(bContext *C, wmOperator *op) continue; sco = CustomData_bmesh_get_n(&em->bm->vdata, eve->head.data, CD_SHAPEKEY, shape); - VECCOPY(co, sco); + copy_v3_v3(co, sco); if(add) { @@ -3000,7 +3000,7 @@ static int blend_from_shape_exec(bContext *C, wmOperator *op) else interp_v3_v3v3(eve->co, eve->co, co, blend); - VECCOPY(sco, co); + copy_v3_v3(sco, co); } DAG_id_tag_update(&me->id, OB_RECALC_DATA); @@ -3437,7 +3437,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op) gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "knife cut exec"); for(bv=BMIter_New(&iter, bm, BM_VERTS_OF_MESH, NULL);bv;bv=BMIter_Step(&iter)){ scr = MEM_mallocN(sizeof(float)*2, "Vertex Screen Coordinates"); - VECCOPY(co, bv->co); + copy_v3_v3(co, bv->co); co[3]= 1.0; mul_m4_v4(obedit->obmat, co); project_float(ar, co, scr); @@ -4255,7 +4255,7 @@ static int select_mirror_exec(bContext *C, wmOperator *op) if (!BM_GetIndex(v1) || BM_TestHFlag(v1, BM_HIDDEN)) continue; - VECCOPY(mirror_co, v1->co); + copy_v3_v3(mirror_co, v1->co); mirror_co[0] *= -1.0f; v2 = BMBVH_FindClosestVertTopo(tree, mirror_co, MIRROR_THRESH, v1);