diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 45 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.h | 7 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_path.c | 90 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 61 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_navmesh.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 9 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 7 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 2 |
12 files changed, 128 insertions, 103 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index 313d76721fa..dc7c13b3fe0 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -555,12 +555,12 @@ void BM_elem_select_set(BMesh *bm, BMElem *ele, const bool select) } /* this replaces the active flag used in uv/face mode */ -void BM_active_face_set(BMesh *bm, BMFace *efa) +void BM_mesh_active_face_set(BMesh *bm, BMFace *efa) { bm->act_face = efa; } -BMFace *BM_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_selected) +BMFace *BM_mesh_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_selected) { if (bm->act_face && (!is_selected || BM_elem_flag_test(bm->act_face, BM_ELEM_SELECT))) { return bm->act_face; @@ -600,6 +600,45 @@ BMFace *BM_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_select return NULL; } +BMEdge *BM_mesh_active_edge_get(BMesh *bm) +{ + if (bm->selected.last) { + BMEditSelection *ese = bm->selected.last; + + if (ese && ese->htype == BM_EDGE) { + return (BMEdge *)ese->ele; + } + } + + return NULL; +} + +BMVert *BM_mesh_active_vert_get(BMesh *bm) +{ + if (bm->selected.last) { + BMEditSelection *ese = bm->selected.last; + + if (ese && ese->htype == BM_VERT) { + return (BMVert *)ese->ele; + } + } + + return NULL; +} + +BMElem *BM_mesh_active_elem_get(BMesh *bm) +{ + if (bm->selected.last) { + BMEditSelection *ese = bm->selected.last; + + if (ese) { + return ese->ele; + } + } + + return NULL; +} + /** * Generic way to get data from an EditSelection type * These functions were written to be used by the Modifier widget @@ -763,7 +802,7 @@ void BM_select_history_validate(BMesh *bm) bool BM_select_history_active_get(BMesh *bm, BMEditSelection *ese) { BMEditSelection *ese_last = bm->selected.last; - BMFace *efa = BM_active_face_get(bm, false, false); + BMFace *efa = BM_mesh_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 a3d2d4a6985..b7040e63458 100644 --- a/source/blender/bmesh/intern/bmesh_marking.h +++ b/source/blender/bmesh/intern/bmesh_marking.h @@ -70,8 +70,11 @@ int BM_mesh_elem_hflag_count_enabled(BMesh *bm, const char htype, const char hfl int BM_mesh_elem_hflag_count_disabled(BMesh *bm, const char htype, const char hflag, const bool respecthide); /* edit selection stuff */ -void BM_active_face_set(BMesh *bm, BMFace *f); -BMFace *BM_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_selected); +void BM_mesh_active_face_set(BMesh *bm, BMFace *f); +BMFace *BM_mesh_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_selected); +BMEdge *BM_mesh_active_edge_get(BMesh *bm); +BMVert *BM_mesh_active_vert_get(BMesh *bm); +BMElem *BM_mesh_active_elem_get(BMesh *bm); void BM_editselection_center(BMEditSelection *ese, float r_center[3]); void BM_editselection_normal(BMEditSelection *ese, float r_normal[3]); diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c index 7b6d198d537..f4fd5a89277 100644 --- a/source/blender/editors/mesh/editmesh_path.c +++ b/source/blender/editors/mesh/editmesh_path.c @@ -83,28 +83,22 @@ static bool mouse_mesh_shortest_path_vert(ViewContext *vc) /* unlike edge/face versions, this uses a bmesh operator */ BMEditMesh *em = vc->em; + BMesh *bm = em->bm; BMVert *v_dst; float dist = 75.0f; const bool use_length = true; v_dst = EDBM_vert_find_nearest(vc, &dist, false, false); if (v_dst) { - struct UserData user_data = {vc->em->bm, vc->obedit->data, vc->scene}; + struct UserData user_data = {bm, vc->obedit->data, vc->scene}; LinkNode *path = NULL; + BMVert *v_act = BM_mesh_active_vert_get(bm); - if (em->bm->selected.last) { - BMEditSelection *ese = em->bm->selected.last; - - if (ese && ese->htype == BM_VERT) { - BMVert *v_act; - v_act = (BMVert *)ese->ele; - if (v_act != v_dst) { - if ((path = BM_mesh_calc_path_vert(em->bm, v_act, v_dst, use_length, - &user_data, verttag_filter_cb))) - { - BM_select_history_remove(em->bm, v_act); - } - } + if (v_act && (v_act != v_dst)) { + if ((path = BM_mesh_calc_path_vert(bm, v_act, v_dst, use_length, + &user_data, verttag_filter_cb))) + { + BM_select_history_remove(bm, v_act); } } @@ -137,9 +131,9 @@ static bool mouse_mesh_shortest_path_vert(ViewContext *vc) /* even if this is selected it may not be in the selection list */ if (BM_elem_flag_test(v_dst, BM_ELEM_SELECT) == 0) - BM_select_history_remove(em->bm, v_dst); + BM_select_history_remove(bm, v_dst); else - BM_select_history_store(em->bm, v_dst); + BM_select_history_store(bm, v_dst); EDBM_update_generic(em, false, false); @@ -254,31 +248,25 @@ static void edgetag_ensure_cd_flag(Scene *scene, Mesh *me) static bool mouse_mesh_shortest_path_edge(ViewContext *vc) { BMEditMesh *em = vc->em; + BMesh *bm = em->bm; BMEdge *e_dst; float dist = 75.0f; const bool use_length = true; e_dst = EDBM_edge_find_nearest(vc, &dist); if (e_dst) { - struct UserData user_data = {vc->em->bm, vc->obedit->data, vc->scene}; + struct UserData user_data = {bm, vc->obedit->data, vc->scene}; LinkNode *path = NULL; Mesh *me = vc->obedit->data; + BMEdge *e_act = BM_mesh_active_edge_get(bm); edgetag_ensure_cd_flag(vc->scene, em->ob->data); - if (em->bm->selected.last) { - BMEditSelection *ese = em->bm->selected.last; - - if (ese && ese->htype == BM_EDGE) { - BMEdge *e_act; - e_act = (BMEdge *)ese->ele; - if (e_act != e_dst) { - if ((path = BM_mesh_calc_path_edge(em->bm, e_act, e_dst, use_length, - &user_data, edgetag_filter_cb))) - { - BM_select_history_remove(em->bm, e_act); - } - } + if (e_act && (e_act != e_dst)) { + if ((path = BM_mesh_calc_path_edge(bm, e_act, e_dst, use_length, + &user_data, edgetag_filter_cb))) + { + BM_select_history_remove(bm, e_act); } } @@ -312,9 +300,9 @@ static bool mouse_mesh_shortest_path_edge(ViewContext *vc) /* even if this is selected it may not be in the selection list */ if (edgetag_test_cb(e_dst, &user_data) == 0) - BM_select_history_remove(em->bm, e_dst); + BM_select_history_remove(bm, e_dst); else - BM_select_history_store(em->bm, e_dst); + BM_select_history_store(bm, e_dst); /* force drawmode for mesh */ switch (vc->scene->toolsettings->edge_mode) { @@ -373,22 +361,23 @@ static void facetag_set_cb(BMFace *f, bool val, void *user_data_v) static bool mouse_mesh_shortest_path_face(ViewContext *vc) { BMEditMesh *em = vc->em; + BMesh *bm = em->bm; BMFace *f_dst; float dist = 75.0f; const bool use_length = true; f_dst = EDBM_face_find_nearest(vc, &dist); if (f_dst) { - struct UserData user_data = {vc->em->bm, vc->obedit->data, vc->scene}; + struct UserData user_data = {bm, vc->obedit->data, vc->scene}; LinkNode *path = NULL; - BMFace *f_act = BM_active_face_get(em->bm, false, true); + BMFace *f_act = BM_mesh_active_face_get(bm, false, true); if (f_act) { if (f_act != f_dst) { - if ((path = BM_mesh_calc_path_face(em->bm, f_act, f_dst, use_length, + if ((path = BM_mesh_calc_path_face(bm, f_act, f_dst, use_length, &user_data, facetag_filter_cb))) { - BM_select_history_remove(em->bm, f_act); + BM_select_history_remove(bm, f_act); } } } @@ -422,11 +411,11 @@ static bool mouse_mesh_shortest_path_face(ViewContext *vc) /* even if this is selected it may not be in the selection list */ if (facetag_test_cb(f_dst, &user_data) == 0) - BM_select_history_remove(em->bm, f_dst); + BM_select_history_remove(bm, f_dst); else - BM_select_history_store(em->bm, f_dst); + BM_select_history_store(bm, f_dst); - BM_active_face_set(em->bm, f_dst); + BM_mesh_active_face_set(bm, f_dst); EDBM_update_generic(em, false, false); @@ -513,6 +502,7 @@ static int edbm_shortest_path_select_exec(bContext *C, wmOperator *op) { Object *ob = CTX_data_edit_object(C); BMEditMesh *em = BKE_editmesh_from_object(ob); + BMesh *bm = em->bm; BMIter iter; BMEditSelection *ese_src, *ese_dst; BMElem *ele_src = NULL, *ele_dst = NULL, *ele; @@ -520,7 +510,7 @@ static int edbm_shortest_path_select_exec(bContext *C, wmOperator *op) const bool use_length = RNA_boolean_get(op->ptr, "use_length"); /* first try to find vertices in edit selection */ - ese_src = em->bm->selected.last; + ese_src = bm->selected.last; if (ese_src && (ese_dst = ese_src->prev) && (ese_src->htype == ese_dst->htype)) { ele_src = ese_src->ele; ele_dst = ese_dst->ele; @@ -528,8 +518,8 @@ static int edbm_shortest_path_select_exec(bContext *C, wmOperator *op) else { /* if selection history isn't available, find two selected elements */ ele_src = ele_dst = NULL; - if ((em->selectmode & SCE_SELECT_VERTEX) && (em->bm->totvertsel >= 2)) { - BM_ITER_MESH (ele, &iter, em->bm, BM_VERTS_OF_MESH) { + if ((em->selectmode & SCE_SELECT_VERTEX) && (bm->totvertsel >= 2)) { + BM_ITER_MESH (ele, &iter, bm, BM_VERTS_OF_MESH) { if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) { if (ele_src == NULL) ele_src = ele; else if (ele_dst == NULL) ele_dst = ele; @@ -538,9 +528,9 @@ static int edbm_shortest_path_select_exec(bContext *C, wmOperator *op) } } - if ((ele_dst == NULL) && (em->selectmode & SCE_SELECT_EDGE) && (em->bm->totedgesel >= 2)) { + if ((ele_dst == NULL) && (em->selectmode & SCE_SELECT_EDGE) && (bm->totedgesel >= 2)) { ele_src = NULL; - BM_ITER_MESH (ele, &iter, em->bm, BM_EDGES_OF_MESH) { + BM_ITER_MESH (ele, &iter, bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) { if (ele_src == NULL) ele_src = ele; else if (ele_dst == NULL) ele_dst = ele; @@ -549,9 +539,9 @@ static int edbm_shortest_path_select_exec(bContext *C, wmOperator *op) } } - if ((ele_dst == NULL) && (em->selectmode & SCE_SELECT_FACE) && (em->bm->totfacesel >= 2)) { + if ((ele_dst == NULL) && (em->selectmode & SCE_SELECT_FACE) && (bm->totfacesel >= 2)) { ele_src = NULL; - BM_ITER_MESH (ele, &iter, em->bm, BM_FACES_OF_MESH) { + BM_ITER_MESH (ele, &iter, bm, BM_FACES_OF_MESH) { if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) { if (ele_src == NULL) ele_src = ele; else if (ele_dst == NULL) ele_dst = ele; @@ -566,17 +556,17 @@ static int edbm_shortest_path_select_exec(bContext *C, wmOperator *op) switch (ele_src->head.htype) { case BM_VERT: path = BM_mesh_calc_path_vert( - em->bm, (BMVert *)ele_src, (BMVert *)ele_dst, use_length, + bm, (BMVert *)ele_src, (BMVert *)ele_dst, use_length, NULL, (bool (*)(BMVert *, void *))ele_filter_visible_cb); break; case BM_EDGE: path = BM_mesh_calc_path_edge( - em->bm, (BMEdge *)ele_src, (BMEdge *)ele_dst, use_length, + bm, (BMEdge *)ele_src, (BMEdge *)ele_dst, use_length, NULL, (bool (*)(BMEdge *, void *))ele_filter_visible_cb); break; case BM_FACE: path = BM_mesh_calc_path_face( - em->bm, (BMFace *)ele_src, (BMFace *)ele_dst, use_length, + bm, (BMFace *)ele_src, (BMFace *)ele_dst, use_length, NULL, (bool (*)(BMFace *, void *))ele_filter_visible_cb); break; } @@ -585,7 +575,7 @@ static int edbm_shortest_path_select_exec(bContext *C, wmOperator *op) LinkNode *node = path; do { - BM_elem_select_set(em->bm, node->link, true); + BM_elem_select_set(bm, node->link, true); } while ((node = node->next)); BLI_linklist_free(path, NULL); diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 77b91365535..df5d764d69b 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1204,7 +1204,7 @@ static void mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de } } if (efa) { - BM_active_face_set(em->bm, efa); + BM_mesh_active_face_set(em->bm, efa); BM_select_history_store(em->bm, efa); } } @@ -1371,7 +1371,7 @@ bool EDBM_select_pick(bContext *C, const int mval[2], bool extend, bool deselect if (efa) { if (extend) { /* set the last selected face */ - BM_active_face_set(vc.em->bm, efa); + BM_mesh_active_face_set(vc.em->bm, efa); /* Work-around: deselect first, so we can guarantee it will */ /* be active even if it was already selected */ @@ -1386,7 +1386,7 @@ bool EDBM_select_pick(bContext *C, const int mval[2], bool extend, bool deselect } else { /* set the last selected face */ - BM_active_face_set(vc.em->bm, efa); + BM_mesh_active_face_set(vc.em->bm, efa); if (!BM_elem_flag_test(efa, BM_ELEM_SELECT)) { BM_select_history_store(vc.em->bm, efa); @@ -2383,27 +2383,25 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed, BMEdge *e; BMFace *f; BMIter iter; - BMEditSelection *ese; + BMElem *ele; *r_eve = NULL; *r_eed = NULL; *r_efa = NULL; EDBM_selectmode_flush(em); - ese = (BMEditSelection *)em->bm->selected.last; + ele = BM_mesh_active_elem_get(em->bm); - if (ese) { - switch (ese->htype) { - case BM_VERT: - *r_eve = (BMVert *)ese->ele; - return; - case BM_EDGE: - *r_eed = (BMEdge *)ese->ele; - return; - case BM_FACE: - *r_efa = (BMFace *)ese->ele; - return; - } + switch (ele->head.htype) { + case BM_VERT: + *r_eve = (BMVert *)ele; + return; + case BM_EDGE: + *r_eed = (BMEdge *)ele; + return; + case BM_FACE: + *r_efa = (BMFace *)ele; + return; } if (em->selectmode & SCE_SELECT_VERTEX) { @@ -2423,7 +2421,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, false); + f = BM_mesh_active_face_get(em->bm, true, false); if (f) { *r_efa = f; return; @@ -2832,39 +2830,40 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op) { Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BKE_editmesh_from_object(obedit); - BMEditSelection *ese = em->bm->selected.last; + BMesh *bm = em->bm; + BMVert *v_act = BM_mesh_active_vert_get(bm); const int axis = RNA_enum_get(op->ptr, "axis"); const int mode = RNA_enum_get(op->ptr, "mode"); /* -1 == aligned, 0 == neg, 1 == pos */ - if (ese == NULL || ese->htype != BM_VERT) { + if (v_act == NULL) { BKE_report(op->reports, RPT_WARNING, "This operator requires an active vertex (last selected)"); return OPERATOR_CANCELLED; } else { - BMVert *ev, *act_vert = (BMVert *)ese->ele; + BMVert *v; BMIter iter; - float value = act_vert->co[axis]; - float limit = CTX_data_tool_settings(C)->doublimit; // XXX + const float limit = CTX_data_tool_settings(C)->doublimit; // XXX + float value = v_act->co[axis]; if (mode == 0) value -= limit; else if (mode == 1) value += limit; - BM_ITER_MESH (ev, &iter, em->bm, BM_VERTS_OF_MESH) { - if (!BM_elem_flag_test(ev, BM_ELEM_HIDDEN)) { + BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { + if (!BM_elem_flag_test(v, BM_ELEM_HIDDEN)) { switch (mode) { case -1: /* aligned */ - if (fabsf(ev->co[axis] - value) < limit) - BM_vert_select_set(em->bm, ev, true); + if (fabsf(v->co[axis] - value) < limit) + BM_vert_select_set(bm, v, true); break; case 0: /* neg */ - if (ev->co[axis] > value) - BM_vert_select_set(em->bm, ev, true); + if (v->co[axis] > value) + BM_vert_select_set(bm, v, true); break; case 1: /* pos */ - if (ev->co[axis] < value) - BM_vert_select_set(em->bm, ev, true); + if (v->co[axis] < value) + BM_vert_select_set(bm, v, true); break; } } diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index f3540fe62b7..560c314405e 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -1089,7 +1089,7 @@ MTexPoly *EDBM_mtexpoly_active_get(BMEditMesh *em, BMFace **r_act_efa, const boo if (!EDBM_mtexpoly_check(em)) return NULL; - efa = BM_active_face_get(em->bm, sloppy, selected); + efa = BM_mesh_active_face_get(em->bm, sloppy, selected); if (efa) { if (r_act_efa) *r_act_efa = efa; diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c index 7a1fdd71b20..ba9bd8d3f7b 100644 --- a/source/blender/editors/mesh/mesh_navmesh.c +++ b/source/blender/editors/mesh/mesh_navmesh.c @@ -501,7 +501,7 @@ static int navmesh_face_copy_exec(bContext *C, wmOperator *op) BMEditMesh *em = BKE_editmesh_from_object(obedit); /* do work here */ - BMFace *efa_act = BM_active_face_get(em->bm, false, false); + BMFace *efa_act = BM_mesh_active_face_get(em->bm, false, false); if (efa_act) { if (CustomData_has_layer(&em->bm->pdata, CD_RECAST)) { diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index b8b245802bf..b0d337c365f 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -1368,14 +1368,13 @@ MDeformVert *ED_mesh_active_dvert_get_em(Object *ob, BMVert **r_eve) { if (ob->mode & OB_MODE_EDIT && ob->type == OB_MESH && ob->defbase.first) { Mesh *me = ob->data; - BMEditMesh *em = me->edit_btmesh; - const int cd_dvert_offset = CustomData_get_offset(&em->bm->vdata, CD_MDEFORMVERT); + BMesh *bm = me->edit_btmesh->bm; + const int cd_dvert_offset = CustomData_get_offset(&bm->vdata, CD_MDEFORMVERT); if (cd_dvert_offset != -1) { - BMEditSelection *ese = (BMEditSelection *)em->bm->selected.last; + BMVert *eve = BM_mesh_active_vert_get(bm); - if (ese && ese->htype == BM_VERT) { - BMVert *eve = (BMVert *)ese->ele; + if (eve) { if (r_eve) *r_eve = eve; return BM_ELEM_CD_GET_VOID_P(eve, cd_dvert_offset); } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 79ad62ee2e8..63906c4d429 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3004,7 +3004,7 @@ static void draw_em_fancy(Scene *scene, ARegion *ar, View3D *v3d, { RegionView3D *rv3d = ar->regiondata; Mesh *me = ob->data; - BMFace *efa_act = BM_active_face_get(em->bm, false, true); /* annoying but active faces is stored differently */ + BMFace *efa_act = BM_mesh_active_face_get(em->bm, false, true); /* annoying but active faces is stored differently */ BMEdge *eed_act = NULL; BMVert *eve_act = NULL; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 1df5a7e323c..81af26b0d05 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2110,12 +2110,7 @@ static void createTransEditVerts(TransInfo *t) } /* check active */ - if (em->bm->selected.last) { - BMEditSelection *ese = em->bm->selected.last; - if (ese->htype == BM_VERT) { - eve_act = (BMVert *)ese->ele; - } - } + eve_act = BM_mesh_active_vert_get(bm); if (t->mode == TFM_BWEIGHT) { BM_mesh_cd_flag_ensure(bm, BKE_mesh_from_object(t->obedit), ME_CDFLAG_VERT_BWEIGHT); diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 62b02cff683..438f6bbdb9c 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -443,7 +443,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) const int cd_poly_tex_offset = CustomData_get_offset(&bm->pdata, CD_MTEXPOLY); activetf = EDBM_mtexpoly_active_get(em, &efa_act, FALSE, FALSE); /* will be set to NULL if hidden */ - activef = BM_active_face_get(bm, FALSE, FALSE); + activef = BM_mesh_active_face_get(bm, FALSE, FALSE); ts = scene->toolsettings; drawfaces = draw_uvs_face_check(scene); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 75160cc8a16..1ed00c3aa20 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -2098,7 +2098,7 @@ static int uv_mouse_select(bContext *C, const float co[2], bool extend, bool loo } /* make active */ - BM_active_face_set(em->bm, hit.efa); + BM_mesh_active_face_set(em->bm, hit.efa); /* mark all face vertices as being hit */ diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 8d7b8dc4e28..a100757980c 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -205,7 +205,7 @@ void uvedit_get_aspect(Scene *scene, Object *ob, BMEditMesh *em, float *aspx, fl BMFace *efa; Image *ima; - efa = BM_active_face_get(em->bm, sloppy, selected); + efa = BM_mesh_active_face_get(em->bm, sloppy, selected); if (efa) { if (BKE_scene_use_new_shading_nodes(scene)) { |