diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-10 12:16:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-10 12:16:19 +0400 |
commit | 7c64109bce446b91f35e187f081f3244c5c92522 (patch) | |
tree | 7acefa4a99d3182b90f0b0b52d813cd111ab3713 /source/blender/editors/uvedit/uvedit_draw.c | |
parent | 2a43380dedd2aec7d5cb0260448e894c22da04fb (diff) |
bmesh todo: uv stretch area draw mode wasn't calculating ngon area - added area_poly_v2().
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_draw.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 607640090aa..023f281aea9 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -194,8 +194,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe uv_poly_copy_aspect(tf_uvorig, tf_uv, aspx, aspy, efa->len); totarea += BM_face_calc_area(efa); - //totuvarea += tf_area(tf, efa->v4!=0); - totuvarea += uv_poly_area(tf_uv, efa->len); + totuvarea += area_poly_v2(efa->len, tf_uv); if (uvedit_face_visible_test(scene, ima, efa, tf)) { BM_elem_flag_enable(efa, BM_ELEM_TAG); @@ -238,8 +237,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe uv_poly_copy_aspect(tf_uvorig, tf_uv, aspx, aspy, efa->len); - //uvarea = tf_area(tf, efa->v4!=0) / totuvarea; - uvarea = uv_poly_area(tf_uv, efa->len) / totuvarea; + uvarea = area_poly_v2(efa->len, tf_uv) / totuvarea; if (area < FLT_EPSILON || uvarea < FLT_EPSILON) areadiff = 1.0f; |