diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-04-03 23:08:06 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-04-03 23:08:06 +0400 |
commit | ff14479983f0606678a9242f869f6b0fc5a78f99 (patch) | |
tree | cfb58517a9e11280d0ced5b78bcc0a8fe54d0038 /source/blender/editors/uvedit/uvedit_buttons.c | |
parent | c86b17ddb7c64e396670e9ef3a8233ec287daf22 (diff) |
Fix #30796: uv vertex coordinates panel in uv editor incorrectly taking into
account selected uvs from hidden faces.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_buttons.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_buttons.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/uvedit/uvedit_buttons.c b/source/blender/editors/uvedit/uvedit_buttons.c index ff673fa0eab..1b5cef6f07d 100644 --- a/source/blender/editors/uvedit/uvedit_buttons.c +++ b/source/blender/editors/uvedit/uvedit_buttons.c @@ -62,16 +62,21 @@ /* UV Utilities */ -static int uvedit_center(Scene *scene, BMEditMesh *em, Image *UNUSED(ima), float center[2]) +static int uvedit_center(Scene *scene, BMEditMesh *em, Image *ima, float center[2]) { BMFace *f; BMLoop *l; BMIter iter, liter; + MTexPoly *tf; MLoopUV *luv; int tot = 0.0; zero_v2(center); BM_ITER(f, &iter, em->bm, BM_FACES_OF_MESH, NULL) { + tf = CustomData_bmesh_get(&em->bm->pdata, f->head.data, CD_MTEXPOLY); + if (!uvedit_face_visible(scene, ima, f, tf)) + continue; + BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, f) { luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV); if (uvedit_uv_selected(em, scene, l)) { |