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/editors/mesh | |
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/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_navmesh.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 765091a3d1d..a9e8c253c82 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -2221,7 +2221,7 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed, } } else if (em->selectmode & SCE_SELECT_FACE) { - f = BM_active_face_get(em->bm, TRUE); + f = BM_active_face_get(em->bm, TRUE, FALSE); if (f) { *r_efa = f; return; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index aaf1701d723..a111c2ffafb 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -992,15 +992,15 @@ void EDBM_uv_element_map_free(UvElementMap *element_map) /* last_sel, use em->act_face otherwise get the last selected face in the editselections * at the moment, last_sel is mainly useful for making sure the space image dosnt flicker */ -MTexPoly *EDBM_mtexpoly_active_get(BMEditMesh *em, BMFace **r_act_efa, int sloppy) +MTexPoly *EDBM_mtexpoly_active_get(BMEditMesh *em, BMFace **r_act_efa, int sloppy, int selected) { BMFace *efa = NULL; if (!EDBM_mtexpoly_check(em)) return NULL; - efa = BM_active_face_get(em->bm, sloppy); - + efa = BM_active_face_get(em->bm, sloppy, selected); + if (efa) { if (r_act_efa) *r_act_efa = efa; return CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c index 14d20d68455..88b1f191e3a 100644 --- a/source/blender/editors/mesh/mesh_navmesh.c +++ b/source/blender/editors/mesh/mesh_navmesh.c @@ -491,7 +491,7 @@ static int navmesh_face_copy_exec(bContext *C, wmOperator *op) BMEditMesh *em = BMEdit_FromObject(obedit); /* do work here */ - BMFace *efa_act = BM_active_face_get(em->bm, FALSE); + BMFace *efa_act = BM_active_face_get(em->bm, FALSE, FALSE); if (efa_act) { if (CustomData_has_layer(&em->bm->pdata, CD_RECAST)) { |