Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2019-11-27 21:06:41 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-11-27 21:09:49 +0300
commit9c4cec2de9582e9f817af7320f77ee136db29adb (patch)
tree27ed7a63e17181271536b75b000f5e77766981f6 /source/blender/editors/space_info
parent34902f200890d812edfd96e838e03241f5b3eedc (diff)
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.
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r--source/blender/editors/space_info/info_stats.c4
1 files changed, 4 insertions, 0 deletions
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++;