[Bf-blender-cvs] [9c4cec2de95] master: Fix T71000: Statistics don't take collections hidden state into account
Dalai Felinto
noreply at git.blender.org
Wed Nov 27 19:10:03 CET 2019
Commit: 9c4cec2de9582e9f817af7320f77ee136db29adb
Author: Dalai Felinto
Date: Wed Nov 27 15:06:41 2019 -0300
Branches: master
https://developer.blender.org/rB9c4cec2de9582e9f817af7320f77ee136db29adb
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.
===================================================================
M source/blender/editors/space_info/info_stats.c
===================================================================
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++;
More information about the Bf-blender-cvs
mailing list