diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-08-31 19:01:40 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-08-31 19:01:40 +0400 |
commit | fe9b1c644f6dbfb531f23f9c4b4af53a3488abbb (patch) | |
tree | 95840364b32eb536e5161fe33f57c863a5c8dc02 /source/blender/bmesh/intern/bmesh_marking.c | |
parent | 78c181fafc91d90e794b43da876f3c317a4fe3a6 (diff) |
Fix #32458: changing UV image in image editor not working when the active face
was not selected. Now changed it so that the active face must also have its
UVs shown in the image editor to be used as the source of the image shown.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_marking.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index 58ccfa79a02..c0439311104 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -527,9 +527,9 @@ void BM_active_face_set(BMesh *bm, BMFace *efa) bm->act_face = efa; } -BMFace *BM_active_face_get(BMesh *bm, int sloppy) +BMFace *BM_active_face_get(BMesh *bm, int sloppy, int selected) { - if (bm->act_face) { + if (bm->act_face && (!selected || BM_elem_flag_test(bm->act_face, BM_ELEM_SELECT))) { return bm->act_face; } else if (sloppy) { @@ -546,6 +546,9 @@ BMFace *BM_active_face_get(BMesh *bm, int sloppy) if (BM_elem_flag_test(f, BM_ELEM_HIDDEN)) { f = NULL; } + else if (selected && !BM_elem_flag_test(f, BM_ELEM_SELECT)) { + f = NULL; + } else { break; } @@ -768,7 +771,7 @@ void BM_select_history_validate(BMesh *bm) int BM_select_history_active_get(BMesh *bm, BMEditSelection *ese) { BMEditSelection *ese_last = bm->selected.last; - BMFace *efa = BM_active_face_get(bm, FALSE); + BMFace *efa = BM_active_face_get(bm, FALSE, FALSE); ese->next = ese->prev = NULL; |