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-08-31 19:01:40 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-08-31 19:01:40 +0400
commitfe9b1c644f6dbfb531f23f9c4b4af53a3488abbb (patch)
tree95840364b32eb536e5161fe33f57c863a5c8dc02 /source/blender/bmesh
parent78c181fafc91d90e794b43da876f3c317a4fe3a6 (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')
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c9
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.h2
2 files changed, 7 insertions, 4 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;
diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h
index 9b73ed2c390..8d4397794d5 100644
--- a/source/blender/bmesh/intern/bmesh_marking.h
+++ b/source/blender/bmesh/intern/bmesh_marking.h
@@ -71,7 +71,7 @@ int BM_mesh_elem_hflag_count_disabled(BMesh *bm, const char htype, const char hf
/* edit selection stuff */
void BM_active_face_set(BMesh *bm, BMFace *f);
-BMFace *BM_active_face_get(BMesh *bm, int sloppy);
+BMFace *BM_active_face_get(BMesh *bm, int sloppy, int selected);
void BM_editselection_center(BMEditSelection *ese, float r_center[3]);
void BM_editselection_normal(BMEditSelection *ese, float r_normal[3]);