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>2011-09-12 08:14:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-12 08:14:12 +0400
commit4bd0a2ba2dadee66d52f9a1101ee918f1327eec4 (patch)
treeb567b077039e78467e21548c5e03fa8b94fc2b6c /source/blender/editors/mesh
parent471a86bf9ccae23b63cb1a05c9525ef99987581d (diff)
replace VECCOPY -> copy_v3_v3, added copy_v*_v*_short too for typesafe copying, some parts of the code are copying float -> short normals without scaling. fix coming next.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh.c6
-rw-r--r--source/blender/editors/mesh/editmesh_lib.c16
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c4
3 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index e371c346f36..9bf863faae3 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -1659,8 +1659,8 @@ static void *editMesh_to_undoMesh(void *emv)
/* now copy vertices */
a = 0;
for(eve=em->verts.first; eve; eve= eve->next, evec++, a++) {
- VECCOPY(evec->co, eve->co);
- VECCOPY(evec->no, eve->no);
+ copy_v3_v3(evec->co, eve->co);
+ copy_v3_v3(evec->no, eve->no);
evec->f= eve->f;
evec->h= eve->h;
@@ -1761,7 +1761,7 @@ static void undoMesh_to_editMesh(void *umv, void *emv)
eve= addvertlist(em, evec->co, NULL);
evar[a]= eve;
- VECCOPY(eve->no, evec->no);
+ copy_v3_v3(eve->no, evec->no);
eve->f= evec->f;
eve->h= evec->h;
eve->keyindex= evec->keyindex;
diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c
index a7bfa6fc16c..79e0ffc598d 100644
--- a/source/blender/editors/mesh/editmesh_lib.c
+++ b/source/blender/editors/mesh/editmesh_lib.c
@@ -1096,13 +1096,13 @@ short extrudeflag_face_indiv(EditMesh *em, short UNUSED(flag), float *UNUSED(nor
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;
@@ -1648,8 +1648,8 @@ short extrudeflag_vert(Object *obedit, EditMesh *em, short flag, float *nor, int
sel= 1;
v1= addvertlist(em, 0, NULL);
- VECCOPY(v1->co, eve->co);
- VECCOPY(v1->no, eve->no);
+ copy_v3_v3(v1->co, eve->co);
+ copy_v3_v3(v1->no, eve->no);
v1->f= eve->f;
eve->f &= ~flag;
eve->tmp.v = v1;
@@ -2482,7 +2482,7 @@ void EM_make_hq_normals(EditMesh *em)
/* only one face attached to that edge */
/* an edge without another attached- the weight on this is
* undefined, M_PI/2 is 90d in radians and that seems good enough */
- VECCOPY(edge_normal, EM_get_face_for_index(edge_ref->f1)->n)
+ copy_v3_v3(edge_normal, EM_get_face_for_index(edge_ref->f1)->n);
mul_v3_fl(edge_normal, M_PI/2);
}
add_v3_v3(EM_get_vert_for_index(ed_v1)->no, edge_normal );
@@ -2499,7 +2499,7 @@ void EM_make_hq_normals(EditMesh *em)
if(normalize_v3(eve->no) == 0.0f && eve->tmp.l < 0) {
/* exceptional case, totally flat */
efa= EM_get_face_for_index(-(eve->tmp.l) - 1);
- VECCOPY(eve->no, efa->n);
+ copy_v3_v3(eve->no, efa->n);
}
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 44e00ed8181..23bea75d57f 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -1466,8 +1466,8 @@ static void alter_co(float *co, EditEdge *edge, float smooth, float fractal, int
sub_v3_v3v3(nor, edge->v1->co, edge->v2->co);
len= 0.5f*normalize_v3(nor);
- VECCOPY(nor1, edge->v1->no);
- VECCOPY(nor2, edge->v2->no);
+ copy_v3_v3(nor1, edge->v1->no);
+ copy_v3_v3(nor2, edge->v2->no);
/* cosine angle */
fac= nor[0]*nor1[0] + nor[1]*nor1[1] + nor[2]*nor1[2] ;