diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-03-28 01:27:12 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-03-28 01:27:12 +0400 |
commit | 2a66e1d73f4bf08eec1b9d04f8be4d0d1d117a01 (patch) | |
tree | 49451f7592572f788b3123ef9c028e8a2980c1fe /source/blender/src/edit.c | |
parent | 05685e6ca7da4c74c93c84f343bc99dcf7bbb8c2 (diff) |
- added getNum{Verts,Faces} accessors to DerivedMesh with implementations
- updated edit.c to use DerivedMesh interface
Diffstat (limited to 'source/blender/src/edit.c')
-rw-r--r-- | source/blender/src/edit.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c index 0aee2bfa17a..35b973fc151 100644 --- a/source/blender/src/edit.c +++ b/source/blender/src/edit.c @@ -66,6 +66,7 @@ #include "BKE_anim.h" #include "BKE_object.h" #include "BKE_displist.h" +#include "BKE_DerivedMesh.h" #include "BKE_global.h" #include "BKE_lattice.h" #include "BKE_mesh.h" @@ -488,12 +489,14 @@ void count_object(Object *ob, int sel) G.totmesh++; me= get_mesh(ob); if(me) { + DerivedMesh *dm = mesh_get_derived(ob); int totvert, totface; - /* hack, should be getting displistmesh from a central function */ - if (mesh_uses_displist(me) && me->disp.first && ((DispList*)me->disp.first)->type==DL_MESH) { - DispListMesh *dlm= ((DispList*)me->disp.first)->mesh; - totvert= dlm->totvert; - totface= dlm->totface; + + if (dm) { + totvert= dm->getNumVerts(dm); + totface= dm->getNumFaces(dm); + + dm->release(dm); } else { totvert= me->totvert; totface= me->totface; |