diff options
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r-- | source/blender/editors/space_info/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/space_info/SConscript | 2 | ||||
-rw-r--r-- | source/blender/editors/space_info/info_stats.c | 27 |
3 files changed, 11 insertions, 19 deletions
diff --git a/source/blender/editors/space_info/CMakeLists.txt b/source/blender/editors/space_info/CMakeLists.txt index 22347df93a3..1930fb6bcc8 100644 --- a/source/blender/editors/space_info/CMakeLists.txt +++ b/source/blender/editors/space_info/CMakeLists.txt @@ -26,6 +26,7 @@ set(INC ../../blenlib ../../blenloader ../../imbuf + ../../bmesh ../../makesdna ../../makesrna ../../windowmanager diff --git a/source/blender/editors/space_info/SConscript b/source/blender/editors/space_info/SConscript index 697ee4319b8..746edadccc2 100644 --- a/source/blender/editors/space_info/SConscript +++ b/source/blender/editors/space_info/SConscript @@ -4,7 +4,7 @@ Import ('env') sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf ../../blenfont' -incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader' +incs += ' ../../bmesh ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader' defs = [] diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 182e5242a1d..ef4bc2cf003 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -48,6 +48,7 @@ #include "BKE_key.h" #include "BKE_mesh.h" #include "BKE_particle.h" +#include "BKE_tessmesh.h" #include "ED_info.h" #include "ED_armature.h" @@ -140,26 +141,16 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats) static void stats_object_edit(Object *obedit, SceneStats *stats) { if(obedit->type==OB_MESH) { - /* Mesh Edit */ - EditMesh *em= BKE_mesh_get_editmesh(obedit->data); - EditVert *eve; - EditEdge *eed; - EditFace *efa; + BMEditMesh *em = ((Mesh*)obedit->data)->edit_btmesh; + + stats->totvert = em->bm->totvert; + stats->totvertsel = em->bm->totvertsel; - for(eve= em->verts.first; eve; eve=eve->next) { - stats->totvert++; - if(eve->f & SELECT) stats->totvertsel++; - } - for(eed= em->edges.first; eed; eed=eed->next) { - stats->totedge++; - if(eed->f & SELECT) stats->totedgesel++; - } - for(efa= em->faces.first; efa; efa=efa->next) { - stats->totface++; - if(efa->f & SELECT) stats->totfacesel++; - } + stats->totedge = em->bm->totedge; + stats->totedgesel = em->bm->totedgesel; - EM_validate_selections(em); + stats->totface = em->bm->totface; + stats->totfacesel = em->bm->totfacesel; } else if(obedit->type==OB_ARMATURE){ /* Armature Edit */ |