diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-12 08:14:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-12 08:14:12 +0400 |
commit | 4bd0a2ba2dadee66d52f9a1101ee918f1327eec4 (patch) | |
tree | b567b077039e78467e21548c5e03fa8b94fc2b6c /source/blender/editors/transform/transform_orientations.c | |
parent | 471a86bf9ccae23b63cb1a05c9525ef99987581d (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/transform/transform_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 2d539055db3..847fd951bcc 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -222,7 +222,7 @@ int createSpaceNormal(float mat[3][3], float normal[3]) { float tangent[3] = {0.0f, 0.0f, 1.0f}; - VECCOPY(mat[2], normal); + copy_v3_v3(mat[2], normal); if (normalize_v3(mat[2]) == 0.0f) { return 0; /* error return */ } @@ -243,7 +243,7 @@ int createSpaceNormal(float mat[3][3], float normal[3]) int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]) { - VECCOPY(mat[2], normal); + copy_v3_v3(mat[2], normal); if (normalize_v3(mat[2]) == 0.0f) { return 0; /* error return */ } @@ -659,7 +659,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], for(eed= em->edges.first; eed; eed= eed->next) { if(eed->f & SELECT) { /* use average vert normals as plane and edge vector as normal */ - VECCOPY(plane, eed->v1->no); + copy_v3_v3(plane, eed->v1->no); VECADD(plane, plane, eed->v2->no); sub_v3_v3v3(normal, eed->v2->co, eed->v1->co); break; @@ -680,7 +680,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], else { v2 = eve; - VECCOPY(plane, v1->no); + copy_v3_v3(plane, v1->no); VECADD(plane, plane, v2->no); sub_v3_v3v3(normal, v2->co, v1->co); break; @@ -694,7 +694,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 ) { - VECCOPY(normal, eve->no); + copy_v3_v3(normal, eve->no); break; } } @@ -792,7 +792,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], /* Rotation of MetaElem is stored in quat */ quat_to_mat4( mat,ml_sel->quat); - VECCOPY(normal, mat[2]); + copy_v3_v3(normal, mat[2]); negate_v3_v3(plane, mat[1]); @@ -893,8 +893,8 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], } if (ob) { - VECCOPY(normal, ob->obmat[2]); - VECCOPY(plane, ob->obmat[1]); + copy_v3_v3(normal, ob->obmat[2]); + copy_v3_v3(plane, ob->obmat[1]); } result = ORIENTATION_NORMAL; } |