diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-05-28 13:01:43 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-05-28 13:01:43 +0400 |
commit | 3a190396dd8b631b6f33a9b1d142cb8a9275001e (patch) | |
tree | 85ac2d8a31269efd553e75314b9e1d784d037dd1 /source/blender/editors/space_view3d | |
parent | ee15754e318f4d9a1a3136ae0cf3475e42dee590 (diff) |
Fix [#31621] Face Angles Drawn in Strange Places
When do_global is True, don’t compute face angles/area positions based on ob-matrix-transformed coordinates!
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index d22b3125987..f60c46fed9a 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2974,16 +2974,16 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS copy_v3_v3(v1, l[0]->v->co); copy_v3_v3(v2, l[1]->v->co); copy_v3_v3(v3, l[2]->v->co); + add_v3_v3(vmid, v1); + add_v3_v3(vmid, v2); + add_v3_v3(vmid, v3); + n += 3; if (do_global) { mul_mat3_m4_v3(ob->obmat, v1); mul_mat3_m4_v3(ob->obmat, v2); mul_mat3_m4_v3(ob->obmat, v3); } area += area_tri_v3(v1, v2, v3); - add_v3_v3(vmid, v1); - add_v3_v3(vmid, v2); - add_v3_v3(vmid, v3); - n += 3; } if (f) { @@ -3030,16 +3030,15 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS mul_mat3_m4_v3(ob->obmat, v3); angle = angle_v3v3v3(v1, v2, v3); - interp_v3_v3v3(fvec, vmid, v2, 0.8f); copy_v3_v3(v1, v2); copy_v3_v3(v2, v3); } else { angle = angle_v3v3v3(loop->prev->v->co, loop->v->co, loop->next->v->co); - interp_v3_v3v3(fvec, vmid, loop->v->co, 0.8f); } BLI_snprintf(numstr, sizeof(numstr), "%.3f", is_rad ? angle : RAD2DEGF(angle)); + interp_v3_v3v3(fvec, vmid, loop->v->co, 0.8f); view3d_cached_text_draw_add(fvec, numstr, 0, txt_flag, col); } } |