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>2013-09-24 07:31:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-24 07:31:00 +0400
commit5342d57a5eb8f45549bcca81db611ac75188b060 (patch)
tree049a354eee6407512a44e5694a127155858bcd85 /source/blender/blenkernel/intern/mesh.c
parent464e9b8777134ef18d78d4605ec50d030c9a0df8 (diff)
allocate bmesh data from known sizes where possible (was still using defaults in places),
add macros for initializing BMAllocTemplate's, also add assert on invalid use of bmesh_sfme()
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r--source/blender/blenkernel/intern/mesh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 8c179d17901..2dacd58fef9 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -530,8 +530,9 @@ Mesh *BKE_mesh_copy(Mesh *me)
BMesh *BKE_mesh_to_bmesh(Mesh *me, Object *ob)
{
BMesh *bm;
+ const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(me);
- bm = BM_mesh_create(&bm_mesh_allocsize_default);
+ bm = BM_mesh_create(&allocsize);
BM_mesh_bm_from_me(bm, me, false, true, ob->shapenr);