diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-12 14:51:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-12 14:51:45 +0400 |
commit | b6dcdb065d9ca6244f2de9e621439f75cf2c386e (patch) | |
tree | db7e8287d27bd6e68085dab6cacb997f5eb473a9 /source/blender/editors/object/object_hook.c | |
parent | 8b43813b69b36af55635028e18e9b179df217317 (diff) |
code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete.
This uses similar convention to RNA.
* use face/loop/edge/vert as a prefix for functions.
* use 'elem' as a prefix too for functions that can take any type with a BMHeader.
* changed from camel case to underscore separated (like RNA).
Diffstat (limited to 'source/blender/editors/object/object_hook.c')
-rw-r--r-- | source/blender/editors/object/object_hook.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index bf018a75995..2083c51efa9 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -79,7 +79,7 @@ static int return_editmesh_indexar(BMEditMesh *em, int *tot, int **indexar, floa int *index, nr, totvert=0; BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { - if(BM_TestHFlag(eve, BM_ELEM_SELECT)) totvert++; + if(BM_elem_flag_test(eve, BM_ELEM_SELECT)) totvert++; } if(totvert==0) return 0; @@ -89,7 +89,7 @@ static int return_editmesh_indexar(BMEditMesh *em, int *tot, int **indexar, floa zero_v3(cent); BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { - if(BM_TestHFlag(eve, BM_ELEM_SELECT)) { + if(BM_elem_flag_test(eve, BM_ELEM_SELECT)) { *index= nr; index++; add_v3_v3(cent, eve->co); } @@ -148,7 +148,7 @@ static void select_editbmesh_hook(Object *ob, HookModifierData *hmd) BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { if(nr==hmd->indexar[index]) { - BM_Select(em->bm, eve, TRUE); + BM_elem_select_set(em->bm, eve, TRUE); if(index < hmd->totindex-1) index++; } |