Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-04-03 23:08:06 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-04-03 23:08:06 +0400
commitff14479983f0606678a9242f869f6b0fc5a78f99 (patch)
treecfb58517a9e11280d0ced5b78bcc0a8fe54d0038 /source/blender/editors/uvedit/uvedit_buttons.c
parentc86b17ddb7c64e396670e9ef3a8233ec287daf22 (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.c7
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)) {