diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-12-23 06:03:54 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-12-23 06:03:54 +0300 |
commit | 9efe5e5b2327cf22bd187a3d17371f5d156ef9fa (patch) | |
tree | d10cc0ee59c778654d785073f51ad3455503d11d /source/blender/blenkernel/intern/mesh.c | |
parent | 6f730601af1e169bb80a2f73839dea8091211b5c (diff) |
Fixed bug #7981, Crash with multires
Caused by incorrect handling of multires with orco mapping
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 79a8afedf3f..56b1fe7e75b 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -489,21 +489,12 @@ float *get_mesh_orco_verts(Object *ob) vcos= mesh_getRefKeyCos(me, &totvert); } else { - MultiresLevel *lvl = NULL; - MVert *mvert = NULL; - - if(me->mr) { - lvl = multires_level_n(me->mr, me->mr->pinlvl); - vcos = MEM_callocN(sizeof(*vcos)*lvl->totvert, "orco mr mesh"); - mvert = me->mr->verts; - totvert = lvl->totvert; - } - else { - Mesh *tme = me->texcomesh?me->texcomesh:me; - vcos = MEM_callocN(sizeof(*vcos)*me->totvert, "orco mesh"); - mvert = tme->mvert; - totvert = MIN2(tme->totvert, me->totvert); - } + MVert *mvert = NULL; + Mesh *tme = me->texcomesh?me->texcomesh:me; + + vcos = MEM_callocN(sizeof(*vcos)*me->totvert, "orco mesh"); + mvert = tme->mvert; + totvert = MIN2(tme->totvert, me->totvert); for(a=0; a<totvert; a++, mvert++) { vcos[a][0]= mvert->co[0]; |