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:
authorBrecht Van Lommel <brecht@blender.org>2022-09-05 18:14:40 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-09-08 16:23:21 +0300
commit173d8edb0bb6e017235ef85a10963f39725c29ef (patch)
treefc40e57981ed83c0a1bb3532da322843a5571238 /source/blender/editors/space_info
parentb5fc8f611e3948a19c26d425496d76079506f480 (diff)
Cleanup: make meaning of base visibility flags more clear
Rename, add comments, and use flag in the depsgraph to ensure the logic matches. Differential Revision: https://developer.blender.org/D15883
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r--source/blender/editors/space_info/info_stats.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_info/info_stats.cc b/source/blender/editors/space_info/info_stats.cc
index a796ed5a817..0169acc36b7 100644
--- a/source/blender/editors/space_info/info_stats.cc
+++ b/source/blender/editors/space_info/info_stats.cc
@@ -130,7 +130,7 @@ static void stats_object(Object *ob,
SceneStats *stats,
GSet *objects_gset)
{
- if ((ob->base_flag & BASE_VISIBLE_VIEWLAYER) == 0) {
+ if ((ob->base_flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT) == 0) {
return;
}
@@ -365,7 +365,7 @@ static void stats_update(Depsgraph *depsgraph,
if (obedit) {
/* Edit Mode. */
FOREACH_OBJECT_BEGIN (view_layer, ob_iter) {
- if (ob_iter->base_flag & BASE_VISIBLE_VIEWLAYER) {
+ if (ob_iter->base_flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT) {
if (ob_iter->mode & OB_MODE_EDIT) {
stats_object_edit(ob_iter, stats);
stats->totobjsel++;
@@ -385,7 +385,7 @@ static void stats_update(Depsgraph *depsgraph,
else if (ob && (ob->mode & OB_MODE_POSE)) {
/* Pose Mode. */
FOREACH_OBJECT_BEGIN (view_layer, ob_iter) {
- if (ob_iter->base_flag & BASE_VISIBLE_VIEWLAYER) {
+ if (ob_iter->base_flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT) {
if (ob_iter->mode & OB_MODE_POSE) {
stats_object_pose(ob_iter, stats);
stats->totobjsel++;