diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-25 05:24:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-25 05:24:55 +0400 |
commit | c4abd6cf5a8f650794f80d3f9a36ae35e9f6d23c (patch) | |
tree | 4bfac849225d101e8896cff66eac6f357667adb7 /source/blender/bmesh | |
parent | b12fd22791acd7a709c98ffa3b9ce977b41b35bc (diff) |
code cleanup: edge slide code had oddly named variables, added some comments and renamed vars.
also made BM_elem_select_set() a function (was a macro calling a function).
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 10 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.h | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index 57a5b20b689..a69558eeeca 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -496,17 +496,17 @@ int BM_mesh_elem_hflag_count_disabled(BMesh *bm, const char htype, const char hf * \note use BM_elem_flag_test(ele, BM_ELEM_SELECT) to test selection * \note by design, this will not touch the editselection history stuff */ -void _bm_elem_select_set(BMesh *bm, BMHeader *head, int select) +void BM_elem_select_set(BMesh *bm, BMElem *ele, int select) { - switch (head->htype) { + switch (ele->head.htype) { case BM_VERT: - BM_vert_select_set(bm, (BMVert *)head, select); + BM_vert_select_set(bm, (BMVert *)ele, select); break; case BM_EDGE: - BM_edge_select_set(bm, (BMEdge *)head, select); + BM_edge_select_set(bm, (BMEdge *)ele, select); break; case BM_FACE: - BM_face_select_set(bm, (BMFace *)head, select); + BM_face_select_set(bm, (BMFace *)ele, select); break; default: BLI_assert(0); diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h index 03681707826..12ebaedac60 100644 --- a/source/blender/bmesh/intern/bmesh_marking.h +++ b/source/blender/bmesh/intern/bmesh_marking.h @@ -42,8 +42,7 @@ void BM_edge_hide_set(BMEdge *e, int hide); void BM_face_hide_set(BMFace *f, int hide); /* Selection code */ -#define BM_elem_select_set(bm, ele, hide) _bm_elem_select_set(bm, &(ele)->head, hide) -void _bm_elem_select_set(BMesh *bm, BMHeader *ele, int select); +void BM_elem_select_set(BMesh *bm, BMElem *ele, int select); void BM_mesh_elem_hflag_enable_test(BMesh *bm, const char htype, const char hflag, int respecthide, const char hflag_test); |