diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-23 05:19:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-23 05:19:50 +0400 |
commit | 16ff7e40e66f93484695445b89090547de78d086 (patch) | |
tree | 606e56eea7e492173372d06a0db83f0f3e08da0c /source/blender/bmesh/intern/bmesh_mesh.c | |
parent | c498c0eb4283473e719c5696843941051f9deed3 (diff) |
code cleanup: change C naming convention (so py and C api match), eg:
C: BM_face_calc_area(f), Py: BMFace.calc_area()
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 0a5e3bab804..6c208b46244 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -585,6 +585,18 @@ void BM_mesh_elem_index_validate(BMesh *bm, const char *location, const char *fu } /** + * Return the amount of element of type 'type' in a given bmesh. + */ +int BM_mesh_elem_count(BMesh *bm, const char htype) +{ + if (htype == BM_VERT) return bm->totvert; + else if (htype == BM_EDGE) return bm->totedge; + else if (htype == BM_FACE) return bm->totface; + + return 0; +} + +/** * Remaps the vertices, edges and/or faces of the bmesh as indicated by vert/edge/face_idx arrays * (xxx_idx[org_index] = new_index). * |