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
This commit is contained in:
parent
00b57136e4
commit
b54e741a8b
Notes:
blender-bot
2023-02-14 08:06:38 +01:00
Referenced by issue #88512, 2.80->2.93 - Blender does not report the number of lamps in the statistics for the 3D Viewport
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue