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:
authorCampbell Barton <ideasman42@gmail.com>2012-04-25 01:19:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-25 01:19:18 +0400
commit47b6b60e5afd498337653356a52d399b7bf1da38 (patch)
tree21d6d11e48b62cc1a9860e949e51ca3166ac778f
parentd92a4ceb351d6e7d1324e97892bff0b6252c24d5 (diff)
code cleanup: no functional change - had both EDBM_editselection_* and BM_editselection_* funcs, replace EDBM_ funcs.
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c35
-rw-r--r--source/blender/bmesh/intern/bmesh_core.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c82
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.h24
-rw-r--r--source/blender/editors/include/ED_mesh.h6
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c4
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c8
-rw-r--r--source/blender/editors/mesh/editmesh_select.c22
-rw-r--r--source/blender/editors/mesh/editmesh_slide.c8
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c73
-rw-r--r--source/blender/editors/mesh/mesh_intern.h3
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c4
-rw-r--r--source/blender/editors/transform/transform_generics.c4
-rw-r--r--source/blender/editors/transform/transform_manipulator.c4
-rw-r--r--source/blender/editors/transform/transform_orientations.c6
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c2
16 files changed, 132 insertions, 155 deletions
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index dee18e62930..cbdd5dd6983 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -803,6 +803,7 @@ BMesh *BM_mesh_copy(BMesh *bm_old)
BMesh *bm_new;
BMVert *v, *v2, **vtable = NULL;
BMEdge *e, *e2, **edges = NULL, **etable = NULL;
+ BMElem **eletable;
BLI_array_declare(edges);
BMLoop *l, /* *l2, */ **loops = NULL;
BLI_array_declare(loops);
@@ -913,21 +914,29 @@ BMesh *BM_mesh_copy(BMesh *bm_old)
/* copy over edit selection history */
for (ese = bm_old->selected.first; ese; ese = ese->next) {
- void *ele = NULL;
-
- if (ese->htype == BM_VERT)
- ele = vtable[BM_elem_index_get(ese->ele)];
- else if (ese->htype == BM_EDGE)
- ele = etable[BM_elem_index_get(ese->ele)];
- else if (ese->htype == BM_FACE) {
- ele = ftable[BM_elem_index_get(ese->ele)];
+ BMElem *ele = NULL;
+
+ switch (ese->htype) {
+ case BM_VERT:
+ eletable = (BMElem **)vtable;
+ break;
+ case BM_EDGE:
+ eletable = (BMElem **)etable;
+ break;
+ case BM_FACE:
+ eletable = (BMElem **)ftable;
+ break;
+ default:
+ eletable = NULL;
+ break;
}
- else {
- BLI_assert(0);
+
+ if (eletable) {
+ ele = eletable[BM_elem_index_get(ese->ele)];
+ if (ele) {
+ BM_select_history_store(bm_new, ele);
+ }
}
-
- if (ele)
- BM_select_history_store(bm_new, ele);
}
MEM_freeN(etable);
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index 7d4129b1205..f3f7614fe02 100644
--- a/source/blender/bmesh/intern/bmesh_core.c
+++ b/source/blender/bmesh/intern/bmesh_core.c
@@ -453,7 +453,7 @@ static void bm_kill_only_vert(BMesh *bm, BMVert *v)
bm->totvert--;
bm->elem_index_dirty |= BM_VERT;
- BM_select_history_remove(bm, (BMElem *)v);
+ BM_select_history_remove(bm, v);
if (v->head.data)
CustomData_bmesh_free_block(&bm->vdata, &v->head.data);
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 9200d7d2a98..57a5b20b689 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -566,7 +566,7 @@ BMFace *BM_active_face_get(BMesh *bm, int sloppy)
* - #EM_editselection_normal
* - #EM_editselection_plane
*/
-void BM_editselection_center(float r_center[3], BMEditSelection *ese)
+void BM_editselection_center(BMEditSelection *ese, float r_center[3])
{
if (ese->htype == BM_VERT) {
BMVert *eve = (BMVert *)ese->ele;
@@ -583,7 +583,7 @@ void BM_editselection_center(float r_center[3], BMEditSelection *ese)
}
}
-void BM_editselection_normal(float r_normal[3], BMEditSelection *ese)
+void BM_editselection_normal(BMEditSelection *ese, float r_normal[3])
{
if (ese->htype == BM_VERT) {
BMVert *eve = (BMVert *)ese->ele;
@@ -617,14 +617,14 @@ void BM_editselection_normal(float r_normal[3], BMEditSelection *ese)
/* Calculate a plane that is rightangles to the edge/vert/faces normal
* also make the plane run along an axis that is related to the geometry,
* because this is used for the manipulators Y axis. */
-void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese)
+void BM_editselection_plane(BMEditSelection *ese, float r_plane[3])
{
if (ese->htype == BM_VERT) {
BMVert *eve = (BMVert *)ese->ele;
float vec[3] = {0.0f, 0.0f, 0.0f};
if (ese->prev) { /* use previously selected data to make a useful vertex plane */
- BM_editselection_center(vec, ese->prev);
+ BM_editselection_center(ese->prev, vec);
sub_v3_v3v3(r_plane, vec, eve->co);
}
else {
@@ -674,7 +674,7 @@ void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese)
else {
BMVert *verts[4] = {NULL};
- BM_iter_as_array(bm, BM_VERTS_OF_FACE, efa, (void **)verts, 4);
+ BM_iter_as_array(NULL, BM_VERTS_OF_FACE, efa, (void **)verts, 4);
if (efa->len == 4) {
float vecA[3], vecB[3];
@@ -713,12 +713,14 @@ void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese)
normalize_v3(r_plane);
}
-int BM_select_history_check(BMesh *bm, const BMElem *ele)
+
+/* --- macro wrapped funcs --- */
+int _bm_select_history_check(BMesh *bm, const BMHeader *ele)
{
BMEditSelection *ese;
for (ese = bm->selected.first; ese; ese = ese->next) {
- if (ese->ele == ele) {
+ if (ese->ele == (BMElem *)ele) {
return TRUE;
}
}
@@ -726,11 +728,11 @@ int BM_select_history_check(BMesh *bm, const BMElem *ele)
return FALSE;
}
-int BM_select_history_remove(BMesh *bm, BMElem *ele)
+int _bm_select_history_remove(BMesh *bm, BMHeader *ele)
{
BMEditSelection *ese;
for (ese = bm->selected.first; ese; ese = ese->next) {
- if (ese->ele == ele) {
+ if (ese->ele == (BMElem *)ele) {
BLI_freelinkN(&(bm->selected), ese);
return TRUE;
}
@@ -739,26 +741,29 @@ int BM_select_history_remove(BMesh *bm, BMElem *ele)
return FALSE;
}
-void BM_select_history_clear(BMesh *bm)
-{
- BLI_freelistN(&bm->selected);
- bm->selected.first = bm->selected.last = NULL;
-}
-
-void BM_select_history_store_notest(BMesh *bm, BMElem *ele)
+void _bm_select_history_store_notest(BMesh *bm, BMHeader *ele)
{
BMEditSelection *ese = (BMEditSelection *) MEM_callocN(sizeof(BMEditSelection), "BMEdit Selection");
- ese->htype = ((BMHeader *)ele)->htype;
- ese->ele = ele;
+ ese->htype = ele->htype;
+ ese->ele = (BMElem *)ele;
BLI_addtail(&(bm->selected), ese);
}
-void BM_select_history_store(BMesh *bm, BMElem *ele)
+void _bm_select_history_store(BMesh *bm, BMHeader *ele)
{
- if (!BM_select_history_check(bm, ele)) {
- BM_select_history_store_notest(bm, ele);
+ if (!BM_select_history_check(bm, (BMElem *)ele)) {
+ BM_select_history_store_notest(bm, (BMElem *)ele);
}
}
+/* --- end macro wrapped funcs --- */
+
+
+void BM_select_history_clear(BMesh *bm)
+{
+ BLI_freelistN(&bm->selected);
+ bm->selected.first = bm->selected.last = NULL;
+}
+
void BM_select_history_validate(BMesh *bm)
{
@@ -775,6 +780,41 @@ void BM_select_history_validate(BMesh *bm)
}
}
+/* utility function */
+int BM_select_history_active_get(BMesh *bm, BMEditSelection *ese)
+{
+ BMEditSelection *ese_last = bm->selected.last;
+ BMFace *efa = BM_active_face_get(bm, FALSE);
+
+ ese->next = ese->prev = NULL;
+
+ if (ese_last) {
+ if (ese_last->htype == BM_FACE) { /* if there is an active face, use it over the last selected face */
+ if (efa) {
+ ese->ele = (BMElem *)efa;
+ }
+ else {
+ ese->ele = ese_last->ele;
+ }
+ ese->htype = BM_FACE;
+ }
+ else {
+ ese->ele = ese_last->ele;
+ ese->htype = ese_last->htype;
+ }
+ }
+ else if (efa) { /* no */
+ ese->ele = (BMElem *)efa;
+ ese->htype = BM_FACE;
+ }
+ else {
+ ese->ele = NULL;
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
void BM_mesh_elem_hflag_disable_test(BMesh *bm, const char htype, const char hflag,
int respecthide, const char hflag_test)
{
diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h
index a3e97ea9677..03681707826 100644
--- a/source/blender/bmesh/intern/bmesh_marking.h
+++ b/source/blender/bmesh/intern/bmesh_marking.h
@@ -73,15 +73,23 @@ 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);
-void BM_editselection_center(float r_center[3], BMEditSelection *ese);
-void BM_editselection_normal(float r_normal[3], BMEditSelection *ese);
-void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese);
-
-int BM_select_history_check(BMesh *bm, const BMElem *ele);
-int BM_select_history_remove(BMesh *bm, BMElem *ele);
-void BM_select_history_store_notest(BMesh *bm, BMElem *ele);
-void BM_select_history_store(BMesh *bm, BMElem *ele);
+
+void BM_editselection_center(BMEditSelection *ese, float r_center[3]);
+void BM_editselection_normal(BMEditSelection *ese, float r_normal[3]);
+void BM_editselection_plane(BMEditSelection *ese, float r_plane[3]);
+
+#define BM_select_history_check(bm, ele) _bm_select_history_check(bm, &(ele)->head)
+#define BM_select_history_remove(bm, ele) _bm_select_history_remove(bm, &(ele)->head)
+#define BM_select_history_store_notest(bm, ele) _bm_select_history_store_notest(bm, &(ele)->head)
+#define BM_select_history_store(bm, ele) _bm_select_history_store(bm, &(ele)->head)
+
+int _bm_select_history_check(BMesh *bm, const BMHeader *ele);
+int _bm_select_history_remove(BMesh *bm, BMHeader *ele);
+void _bm_select_history_store_notest(BMesh *bm, BMHeader *ele);
+void _bm_select_history_store(BMesh *bm, BMHeader *ele);
+
void BM_select_history_validate(BMesh *bm);
void BM_select_history_clear(BMesh *em);
+int BM_select_history_active_get(BMesh *bm, struct BMEditSelection *ese);
#endif /* __BMESH_MARKING_H__ */
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 10137a5a259..4c503a2687c 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -114,12 +114,8 @@ void EDBM_selectmode_set(struct BMEditMesh *em);
void EDBM_selectmode_convert(struct BMEditMesh *em, short oldmode, short selectmode);
void undo_push_mesh(struct bContext *C, const char *name);
-int EDBM_editselection_active_get(struct BMEditMesh *em, struct BMEditSelection *ese);
-void EDBM_editselection_center(float *center, struct BMEditSelection *ese);
-void EDBM_editselection_plane(struct BMEditMesh *em, float *plane, struct BMEditSelection *ese);
-void EDBM_editselection_normal(float *normal, struct BMEditSelection *ese);
int EDBM_vert_color_check(struct BMEditMesh *em);
-void EDBM_editselection_validate(struct BMEditMesh *em);
+
void EDBM_mesh_hide(struct BMEditMesh *em, int swap);
void EDBM_mesh_reveal(struct BMEditMesh *em);
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index d7201394855..12174d5b9fa 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -337,9 +337,9 @@ static void ringsel_finish(bContext *C, wmOperator *op)
/* sets as active, useful for other tools */
if (em->selectmode & SCE_SELECT_VERTEX)
- EDBM_editselection_store(em, &lcd->eed->v1->head); /* low priority TODO, get vertrex close to mouse */
+ BM_select_history_store(em->bm, lcd->eed->v1); /* low priority TODO, get vertrex close to mouse */
if (em->selectmode & SCE_SELECT_EDGE)
- EDBM_editselection_store(em, &lcd->eed->head);
+ BM_select_history_store(em->bm, lcd->eed);
EDBM_selectmode_flush(lcd->em);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, lcd->ob->data);
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index 15e77458e5e..e755df1f076 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -384,7 +384,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
ED_view3d_ob_project_mat_get(rv3d, obedit, projectMat);
/* find selected vert - same some time and check history first */
- if (EDBM_editselection_active_get(em, &ese) && ese.htype == BM_VERT) {
+ if (BM_select_history_active_get(em->bm, &ese) && ese.htype == BM_VERT) {
v = (BMVert *)ese.ele;
}
else {
@@ -450,7 +450,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
int vi_best = 0;
if (ese.ele) {
- EDBM_editselection_remove(em, &ese.ele->head);
+ BM_select_history_remove(em->bm, ese.ele);
}
dist = FLT_MAX;
@@ -480,7 +480,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
BM_vert_select_set(bm, v, TRUE);
if (ese.ele) {
- EDBM_editselection_store(em, &v->head);
+ BM_select_history_store(em->bm, v);
}
/* splice all others back together */
@@ -573,7 +573,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
if (v_best) {
BM_vert_select_set(bm, v_best, TRUE);
if (ese.ele) {
- EDBM_editselection_store(em, &v_best->head);
+ BM_select_history_store(em->bm, v_best);
}
}
}
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 6c3984f0979..05352938aba 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -1049,10 +1049,10 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short ring)
/* TODO: would be nice if the edge vertex chosen here
* was the one closer to the selection pointer, instead
* of arbitrarily selecting the first one */
- EDBM_editselection_store(em, &eed->v1->head);
+ BM_select_history_store(em->bm, eed->v1);
}
else if (em->selectmode & SCE_SELECT_EDGE) {
- EDBM_editselection_store(em, &eed->head);
+ BM_select_history_store(em->bm, eed);
}
/* TODO: would be nice if the nearest face that
* belongs to the selected edge could be set to
@@ -1364,7 +1364,7 @@ static int mouse_mesh_shortest_path(bContext *C, int mval[2])
e_act = (BMEdge *)ese->ele;
if (e_act != e) {
if (edgetag_shortest_path(vc.scene, em, e_act, e)) {
- EDBM_editselection_remove(em, &e_act->head);
+ BM_select_history_remove(em->bm, e_act);
path = 1;
}
}
@@ -1379,9 +1379,9 @@ static int mouse_mesh_shortest_path(bContext *C, int mval[2])
/* even if this is selected it may not be in the selection list */
if (edgetag_context_check(vc.scene, em, e) == 0)
- EDBM_editselection_remove(em, &e->head);
+ BM_select_history_remove(em->bm, e);
else
- EDBM_editselection_store(em, &e->head);
+ BM_select_history_store(em->bm, e);
/* force drawmode for mesh */
switch (CTX_data_tool_settings(C)->edge_mode) {
@@ -1476,31 +1476,31 @@ int mouse_mesh(bContext *C, const int mval[2], short extend)
BM_active_face_set(vc.em->bm, efa);
if (!BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
- EDBM_editselection_store(vc.em, &efa->head);
+ BM_select_history_store(vc.em->bm, efa);
BM_face_select_set(vc.em->bm, efa, TRUE);
}
else if (extend) {
- EDBM_editselection_remove(vc.em, &efa->head);
+ BM_select_history_remove(vc.em->bm, efa);
BM_face_select_set(vc.em->bm, efa, FALSE);
}
}
else if (eed) {
if (!BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
- EDBM_editselection_store(vc.em, &eed->head);
+ BM_select_history_store(vc.em->bm, eed);
BM_edge_select_set(vc.em->bm, eed, TRUE);
}
else if (extend) {
- EDBM_editselection_remove(vc.em, &eed->head);
+ BM_select_history_remove(vc.em->bm, eed);
BM_edge_select_set(vc.em->bm, eed, FALSE);
}
}
else if (eve) {
if (!BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
- EDBM_editselection_store(vc.em, &eve->head);
+ BM_select_history_store(vc.em->bm, eve);
BM_vert_select_set(vc.em->bm, eve, TRUE);
}
else if (extend) {
- EDBM_editselection_remove(vc.em, &eve->head);
+ BM_select_history_remove(vc.em->bm, eve);
BM_vert_select_set(vc.em->bm, eve, FALSE);
}
}
diff --git a/source/blender/editors/mesh/editmesh_slide.c b/source/blender/editors/mesh/editmesh_slide.c
index 44f7c388a74..3cbb099a0a9 100644
--- a/source/blender/editors/mesh/editmesh_slide.c
+++ b/source/blender/editors/mesh/editmesh_slide.c
@@ -216,13 +216,13 @@ static void vtx_slide_confirm(bContext *C, wmOperator *op)
}
else {
/* Store in historty if not merging */
- EDBM_editselection_store(em, &vso->start_vtx->head);
+ BM_select_history_store(em->bm, vso->start_vtx);
}
}
else {
/* Store edit selection of the active vertex, allows other
* ops to run without reselecting */
- EDBM_editselection_store(em, &vso->start_vtx->head);
+ BM_select_history_store(em->bm, vso->start_vtx);
}
EDBM_selectmode_flush(em);
@@ -664,8 +664,8 @@ static int edbm_vertex_slide_exec(bContext *C, wmOperator *op)
BM_edge_select_set(bm, vso->sel_edge, TRUE);
BM_vert_select_set(bm, vso->start_vtx, TRUE);
- EDBM_editselection_store(em, &vso->sel_edge->head);
- EDBM_editselection_store(em, &vso->start_vtx->head);
+ BM_select_history_store(em->bm, vso->sel_edge);
+ BM_select_history_store(em->bm, vso->start_vtx);
ese = (BMEditSelection *)em->bm->selected.last;
}
distance_t = vso->distance;
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 074c37850f7..4ec3c22d1df 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -465,39 +465,6 @@ void EDBM_select_less(BMEditMesh *em)
EDBM_selectmode_flush(em);
}
-int EDBM_editselection_active_get(BMEditMesh *em, BMEditSelection *ese)
-{
- BMEditSelection *ese_last = em->bm->selected.last;
- BMFace *efa = BM_active_face_get(em->bm, FALSE);
-
- ese->next = ese->prev = NULL;
-
- if (ese_last) {
- if (ese_last->htype == BM_FACE) { /* if there is an active face, use it over the last selected face */
- if (efa) {
- ese->ele = (BMElem *)efa;
- }
- else {
- ese->ele = ese_last->ele;
- }
- ese->htype = BM_FACE;
- }
- else {
- ese->ele = ese_last->ele;
- ese->htype = ese_last->htype;
- }
- }
- else if (efa) { /* no */
- ese->ele = (BMElem *)efa;
- ese->htype = BM_FACE;
- }
- else {
- ese->ele = NULL;
- return 0;
- }
- return 1;
-}
-
void EDBM_flag_disable_all(BMEditMesh *em, const char hflag)
{
BM_mesh_elem_hflag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, hflag, FALSE);
@@ -1272,43 +1239,3 @@ void EDBM_update_generic(bContext *C, BMEditMesh *em, const short do_tessface)
BMEdit_RecalcTessellation(em);
}
}
-
-/* * Selection History ***************************************************** */
-/* these wrap equivalent bmesh functions. I'm in two minds of it we should
- * just use the bm functions directly; on the one hand, there's no real
- * need (at the moment) to wrap them, but on the other hand having these
- * wrapped avoids a confusing mess of mixing BM_ and EDBM_ namespaces. */
-
-void EDBM_editselection_center(float *center, BMEditSelection *ese)
-{
- BM_editselection_center(center, ese);
-}
-
-void EDBM_editselection_normal(float *normal, BMEditSelection *ese)
-{
- BM_editselection_normal(normal, ese);
-}
-
-/* Calculate a plane that is rightangles to the edge/vert/faces normal
- * also make the plane run along an axis that is related to the geometry,
- * because this is used for the manipulators Y axis. */
-void EDBM_editselection_plane(BMEditMesh *em, float *plane, BMEditSelection *ese)
-{
- BM_editselection_plane(em->bm, plane, ese);
-}
-
-void EDBM_editselection_remove(BMEditMesh *em, BMHeader *ele)
-{
- BM_select_history_remove(em->bm, (BMElem *)ele);
-}
-
-void EDBM_editselection_store(BMEditMesh *em, BMHeader *ele)
-{
- BM_select_history_store(em->bm, (BMElem *)ele);
-}
-
-void EDBM_editselection_validate(BMEditMesh *em)
-{
- BM_select_history_validate(em->bm);
-}
-/* end select history */
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 27b1cb6ad54..70ae9704d3e 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -78,9 +78,6 @@ int EDBM_op_finish(struct BMEditMesh *em, struct BMOperator *bmop,
struct wmOperator *op, const int report);
void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag);
-void EDBM_editselection_store(struct BMEditMesh *em, struct BMHeader *ele);
-void EDBM_editselection_validate(struct BMEditMesh *em);
-void EDBM_editselection_remove(struct BMEditMesh *em, struct BMHeader *ele);
void EDBM_stats_update(struct BMEditMesh *em);
/* TODO, move to math_geometry.c */
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index f19c8891f96..1c1fa4c7fac 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -993,8 +993,8 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op))
Mesh *me = obedit->data;
BMEditSelection ese;
- if (EDBM_editselection_active_get(me->edit_btmesh, &ese)) {
- EDBM_editselection_center(curs, &ese);
+ if (BM_select_history_active_get(me->edit_btmesh->bm, &ese)) {
+ BM_editselection_center(&ese, curs);
}
mul_m4_v3(obedit->obmat, curs);
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 0af4830e3c6..b500398dd76 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1523,8 +1523,8 @@ void calculateCenter(TransInfo *t)
BMEditSelection ese;
BMEditMesh *em = BMEdit_FromObject(t->obedit);
- if (EDBM_editselection_active_get(em, &ese)) {
- EDBM_editselection_center(t->center, &ese);
+ if (BM_select_history_active_get(em->bm, &ese)) {
+ BM_editselection_center(&ese, t->center);
calculateCenter2D(t);
break;
}
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 82e57cca705..5b70b25c894 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -300,8 +300,8 @@ int calc_manipulator_stats(const bContext *C)
float vec[3]= {0,0,0};
/* USE LAST SELECTE WITH ACTIVE */
- if (v3d->around==V3D_ACTIVE && EDBM_editselection_active_get(em, &ese)) {
- EDBM_editselection_center(vec, &ese);
+ if ((v3d->around == V3D_ACTIVE) && BM_select_history_active_get(em->bm, &ese)) {
+ BM_editselection_center(&ese, vec);
calc_tw_center(scene, vec);
totsel= 1;
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 2cc9d8fca93..0f929003e8f 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -577,9 +577,9 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
float vec[3]= {0,0,0};
/* USE LAST SELECTED WITH ACTIVE */
- if (activeOnly && EDBM_editselection_active_get(em, &ese)) {
- EDBM_editselection_normal(normal, &ese);
- EDBM_editselection_plane(em, plane, &ese);
+ if (activeOnly && BM_select_history_active_get(em->bm, &ese)) {
+ BM_editselection_normal(&ese, normal);
+ BM_editselection_plane(&ese, plane);
switch (ese.htype)
{
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 45a4772d475..d0486807e8f 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -3105,7 +3105,7 @@ static int hide_exec(bContext *C, wmOperator *op)
if (em->selectmode != SCE_SELECT_FACE)
EDBM_selectmode_flush_ex(em, SCE_SELECT_VERTEX | SCE_SELECT_EDGE);
- EDBM_editselection_validate(em);
+ BM_select_history_validate(em->bm);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;