diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-20 12:13:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-20 12:13:49 +0300 |
commit | e3fe56d9d1463bd0ac313b10dc1a1ad5b340f942 (patch) | |
tree | 20714efdd613956808ca37e4c9ca728b78e13326 /source | |
parent | 72a2d22f039fde625ff5b7748d4b4af1b4a45090 (diff) |
Minor edit to transform-uv-island center calc
Only count each UV to influence the center once.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index c65458a305f..bcd69538b44 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2777,9 +2777,12 @@ static void createTransUVs(bContext *C, TransInfo *t) } if (is_island_center) { - MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); - add_v2_v2(island_center[element->island].co, luv->uv); - island_center[element->island].co_num++; + if (element->flag == false) { + MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); + add_v2_v2(island_center[element->island].co, luv->uv); + island_center[element->island].co_num++; + element->flag = true; + } } } } |