diff options
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h index d449aac04f5..b4443c748ce 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.h +++ b/source/blender/bmesh/intern/bmesh_mesh.h @@ -60,6 +60,7 @@ void BM_edges_sharp_from_angle_set(BMesh *bm, const float split_angle); void bmesh_edit_begin(BMesh *bm, const BMOpTypeFlag type_flag); void bmesh_edit_end(BMesh *bm, const BMOpTypeFlag type_flag); +void BM_mesh_elem_index_ensure_ex(BMesh *bm, const char htype, int elem_offset[4]); void BM_mesh_elem_index_ensure(BMesh *bm, const char hflag); void BM_mesh_elem_index_validate( BMesh *bm, const char *location, const char *func, @@ -110,8 +111,23 @@ extern const BMAllocTemplate bm_mesh_chunksize_default; #define BMALLOC_TEMPLATE_FROM_BM(bm) { (CHECK_TYPE_INLINE(bm, BMesh *), \ (bm)->totvert), (bm)->totedge, (bm)->totloop, (bm)->totface} -#define BMALLOC_TEMPLATE_FROM_ME(me) { (CHECK_TYPE_INLINE(me, Mesh *), \ - (me)->totvert), (me)->totedge, (me)->totloop, (me)->totpoly} + +#define _VA_BMALLOC_TEMPLATE_FROM_ME_1(me) { \ + (CHECK_TYPE_INLINE(me, Mesh *), \ + (me)->totvert), \ + (me)->totedge, \ + (me)->totloop, \ + (me)->totpoly, \ +} +#define _VA_BMALLOC_TEMPLATE_FROM_ME_2(me_a, me_b) { \ + (CHECK_TYPE_INLINE(me_a, Mesh *), \ + CHECK_TYPE_INLINE(me_b, Mesh *), \ + (me_a)->totvert + (me_b)->totvert), \ + (me_a)->totedge + (me_b)->totedge, \ + (me_a)->totloop + (me_b)->totloop, \ + (me_a)->totpoly + (me_b)->totpoly, \ +} +#define BMALLOC_TEMPLATE_FROM_ME(...) VA_NARGS_CALL_OVERLOAD(_VA_BMALLOC_TEMPLATE_FROM_ME_, __VA_ARGS__) #define _VA_BMALLOC_TEMPLATE_FROM_DM_1(dm) { \ (CHECK_TYPE_INLINE(dm, DerivedMesh *), \ |