From 9c4cec2de9582e9f817af7320f77ee136db29adb Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 27 Nov 2019 15:06:41 -0300 Subject: Fix T71000: Statistics don't take collections hidden state into account Simple fix, to mimic what we had pre-local collections. So this is not fully representative of the current load of the scene. I started a more complex route where we literally just count objects that are visible (taking object type restriction, local collections, local view, ...). But in the end it is a bit overkill considering that we have plans to change the statistics. --- source/blender/editors/space_info/info_stats.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/space_info') diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index b51aec90e4f..225ca72a7d0 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -123,6 +123,10 @@ static bool stats_mesheval(Mesh *me_eval, bool is_selected, SceneStats *stats) static void stats_object(Object *ob, SceneStats *stats, GSet *objects_gset) { + if ((ob->base_flag & BASE_VISIBLE_VIEWLAYER) == 0) { + return; + } + const bool is_selected = (ob->base_flag & BASE_SELECTED) != 0; stats->totobj++; -- cgit v1.2.3