Fix #33265: editing uv vertex coordinates in panel could move hidden uv's.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 22 Nov 2012 17:12:41 +0000 (17:12 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 22 Nov 2012 17:12:41 +0000 (17:12 +0000)
source/blender/editors/uvedit/uvedit_buttons.c

index fa39a52444beeee681a49f046e6ac9ec6917c48d..1c32c01b8f09a1cc31ce0d1d1732516bfb11cae4 100644 (file)
@@ -94,14 +94,19 @@ static int uvedit_center(Scene *scene, BMEditMesh *em, Image *ima, float center[
        return tot;
 }
 
-static void uvedit_translate(Scene *scene, BMEditMesh *em, Image *UNUSED(ima), float delta[2])
+static void uvedit_translate(Scene *scene, BMEditMesh *em, Image *ima, float delta[2])
 {
        BMFace *f;
        BMLoop *l;
        BMIter iter, liter;
        MLoopUV *luv;
+       MTexPoly *tf;
        
        BM_ITER_MESH (f, &iter, em->bm, BM_FACES_OF_MESH) {
+               tf = CustomData_bmesh_get(&em->bm->pdata, f->head.data, CD_MTEXPOLY);
+               if (!uvedit_face_visible_test(scene, ima, f, tf))
+                       continue;
+
                BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
                        luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
                        if (uvedit_uv_select_test(em, scene, l)) {