Revision: 45380
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45380
Author:   blendix
Date:     2012-04-03 19:08:06 +0000 (Tue, 03 Apr 2012)
Log Message:
-----------
Fix #30796: uv vertex coordinates panel in uv editor incorrectly taking into
account selected uvs from hidden faces.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/uvedit/uvedit_buttons.c

Modified: trunk/blender/source/blender/editors/uvedit/uvedit_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_buttons.c        
2012-04-03 18:41:40 UTC (rev 45379)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_buttons.c        
2012-04-03 19:08:06 UTC (rev 45380)
@@ -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)) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to