Fix #111821: Sculpt Mode: Scene Statistics showing wrong results #111914

Closed
Pratik Borhade wants to merge 1 commits from PratikPB2123:111821-sculpt-info-stats into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 8 additions and 0 deletions

View File

@ -418,7 +418,15 @@ static void stats_update(Depsgraph *depsgraph,
}
else if (ob && (ob->mode & OB_MODE_SCULPT)) {
/* Sculpt Mode. */
FOREACH_OBJECT_BEGIN (scene, view_layer, ob_iter) {
if (ob_iter->base_flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT) {
stats->totobj++;
}
}
FOREACH_OBJECT_END;
stats_object_sculpt(ob, stats);
stats->totobjsel++;
}
else {
/* Objects. */