diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-13 10:54:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-13 10:54:37 +0400 |
commit | 58993c3f37a876a858075053de1276c8b6aedc2e (patch) | |
tree | e0b411672843220219aae8374fc1dab91cc36d6c /source/blender/editors/uvedit | |
parent | b2667970d286761d31a7f9c9969a0b95428da200 (diff) |
bmesh - UV editor: check if faces are visible before hiding them (was done before bmesh merge).
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index e1ee00be384..aa98e17df24 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -2990,7 +2990,9 @@ static int hide_exec(bContext *C, wmOperator *op) BMLoop *l; BMIter iter, liter; MLoopUV *luv; + MTexPoly *tf; int swap = RNA_boolean_get(op->ptr, "unselected"); + Image *ima = sima ? sima->image : NULL; int facemode = sima ? sima->flag & SI_SELACTFACE : 0; if (ts->uv_flag & UV_SYNC_SELECTION) { @@ -3003,6 +3005,12 @@ static int hide_exec(bContext *C, wmOperator *op) BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) { int hide = 0; + tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); + + if (!uvedit_face_visible(scene, ima, efa, tf)) { + continue; + } + BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) { luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV); |