diff options
Diffstat (limited to 'source/blender/editors/space_info/info_stats.c')
-rw-r--r-- | source/blender/editors/space_info/info_stats.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 0789114c054..cf3607e8fba 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -34,13 +34,14 @@ #include "DNA_meta_types.h" #include "DNA_scene_types.h" +#include "BLI_utildefines.h" + #include "BKE_anim.h" #include "BKE_displist.h" #include "BKE_DerivedMesh.h" #include "BKE_key.h" #include "BKE_mesh.h" #include "BKE_particle.h" -#include "BKE_utildefines.h" #include "ED_armature.h" #include "ED_mesh.h" @@ -91,13 +92,12 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats) case OB_SURF: case OB_CURVE: case OB_FONT: { - Curve *cu= ob->data; int tot= 0, totf= 0; stats->totcurve += totob; - if(cu->disp.first) - count_displist(&cu->disp, &tot, &totf); + if(ob->disp.first) + count_displist(&ob->disp, &tot, &totf); tot *= totob; totf *= totob; @@ -327,12 +327,10 @@ static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats) /* Statistics displayed in info header. Called regularly on scene changes. */ static void stats_update(Scene *scene) { - SceneStats stats; + SceneStats stats= {0}; Object *ob= (scene->basact)? scene->basact->object: NULL; Base *base; - memset(&stats, 0, sizeof(stats)); - if(scene->obedit) { /* Edit Mode */ stats_object_edit(scene->obedit, &stats); @@ -341,7 +339,7 @@ static void stats_update(Scene *scene) /* Pose Mode */ stats_object_pose(ob, &stats); } - else if(ob && (ob->flag & (OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) { + else if(ob && (ob->flag & OB_MODE_ALL_PAINT)) { /* Sculpt and Paint Mode */ stats_object_paint(ob, &stats); } |