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:
authorCampbell Barton <ideasman42@gmail.com>2021-06-16 10:05:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-16 10:17:15 +0300
commitc3fa7b7e4fd773534e0a6d340256f3a25a86ff55 (patch)
treefb8eaa9fdcdcfed575ff4d063cae6e42e314af7c /source/blender/editors
parent4b36c5b1a729cbf99c51cc8ba5de28d890b40016 (diff)
Fix pose-mode statistics with multi-object editing
- Include all objects in pose mode. - Show the number of objects in pose mode. - Show the number of objects in edit mode for all types of objects (not just meshes).
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_info/info_stats.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index b2c39044591..63ce7cb9d7a 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -421,7 +421,22 @@ static void stats_update(Depsgraph *depsgraph, ViewLayer *view_layer, View3D *v3
}
else if (ob && (ob->mode & OB_MODE_POSE)) {
/* Pose Mode. */
- stats_object_pose(ob, &stats);
+ FOREACH_OBJECT_BEGIN (view_layer, ob_iter) {
+ if (ob_iter->base_flag & BASE_VISIBLE_VIEWLAYER) {
+ if (ob_iter->mode & OB_MODE_POSE) {
+ stats_object_pose(ob_iter, &stats);
+ stats.totobjsel++;
+ }
+ else {
+ /* See comment for edit-mode. */
+ if ((v3d_local && !BKE_object_is_visible_in_viewport(v3d_local, ob_iter))) {
+ continue;
+ }
+ }
+ stats.totobj++;
+ }
+ }
+ FOREACH_OBJECT_END;
}
else if (ob && (ob->mode & OB_MODE_SCULPT)) {
/* Sculpt Mode. */
@@ -791,8 +806,8 @@ void ED_info_draw_stats(
}
if (obedit) {
+ stats_row(col1, labels[OBJ], col2, stats_fmt.totobjsel, stats_fmt.totobj, y, height);
if (obedit->type == OB_MESH) {
- stats_row(col1, labels[OBJ], col2, stats_fmt.totobjsel, stats_fmt.totobj, y, height);
stats_row(col1, labels[VERTS], col2, stats_fmt.totvertsel, stats_fmt.totvert, y, height);
stats_row(col1, labels[EDGES], col2, stats_fmt.totedgesel, stats_fmt.totedge, y, height);
stats_row(col1, labels[FACES], col2, stats_fmt.totfacesel, stats_fmt.totface, y, height);
@@ -807,6 +822,7 @@ void ED_info_draw_stats(
}
}
else if (ob && (object_mode & OB_MODE_POSE)) {
+ stats_row(col1, labels[OBJ], col2, stats_fmt.totobjsel, stats_fmt.totobj, y, height);
stats_row(col1, labels[BONES], col2, stats_fmt.totbonesel, stats_fmt.totbone, y, height);
}
else if ((ob) && (ob->type == OB_GPENCIL)) {