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:
authorFalk David <falkdavid@gmx.de>2021-08-03 10:41:08 +0300
committerFalk David <falkdavid@gmx.de>2021-08-03 10:42:53 +0300
commitb54e741a8b5655208ae666653639885afe15c5e8 (patch)
treeea9a8323be87043d1626ddf2cddede881204b57b
parent00b57136e4167ef5a303b1215574bb52a22e9194 (diff)
UI: Add light count to viewport statistics
Even though lights were part of `SceneStats`, they were not used when rBfd10ac9acaa0 was committed. This patch adds the light count back into the statistics. When a light is the active object, it will display the total number of lights in the scene, as well as how many lights are currently selected. {F10141354} Reviewed By: #user_interface, Severin, Blendify, harley Maniphest Tasks: T88512 Differential Revision: https://developer.blender.org/D11387
-rw-r--r--source/blender/editors/space_info/info_stats.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index d7671a372c6..983e04127e0 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -764,6 +764,7 @@ void ED_info_draw_stats(
FRAMES,
STROKES,
POINTS,
+ LIGHTS,
MAX_LABELS_COUNT
};
char labels[MAX_LABELS_COUNT][64];
@@ -779,6 +780,7 @@ void ED_info_draw_stats(
STRNCPY(labels[FRAMES], IFACE_("Frames"));
STRNCPY(labels[STROKES], IFACE_("Strokes"));
STRNCPY(labels[POINTS], IFACE_("Points"));
+ STRNCPY(labels[LIGHTS], IFACE_("Lights"));
int longest_label = 0;
int i;
@@ -832,6 +834,9 @@ void ED_info_draw_stats(
stats_row(col1, labels[FACES], col2, stats_fmt.totfacesculpt, stats_fmt.totface, y, height);
}
}
+ else if ((ob) && (ob->type == OB_LAMP)) {
+ stats_row(col1, labels[LIGHTS], col2, stats_fmt.totlampsel, stats_fmt.totlamp, y, height);
+ }
else {
stats_row(col1, labels[VERTS], col2, stats_fmt.totvert, NULL, y, height);
stats_row(col1, labels[EDGES], col2, stats_fmt.totedge, NULL, y, height);