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
@ -764,6 +764,7 @@ void ED_info_draw_stats(
|
|||||||
FRAMES,
|
FRAMES,
|
||||||
STROKES,
|
STROKES,
|
||||||
POINTS,
|
POINTS,
|
||||||
|
LIGHTS,
|
||||||
MAX_LABELS_COUNT
|
MAX_LABELS_COUNT
|
||||||
};
|
};
|
||||||
char labels[MAX_LABELS_COUNT][64];
|
char labels[MAX_LABELS_COUNT][64];
|
||||||
@ -779,6 +780,7 @@ void ED_info_draw_stats(
|
|||||||
STRNCPY(labels[FRAMES], IFACE_("Frames"));
|
STRNCPY(labels[FRAMES], IFACE_("Frames"));
|
||||||
STRNCPY(labels[STROKES], IFACE_("Strokes"));
|
STRNCPY(labels[STROKES], IFACE_("Strokes"));
|
||||||
STRNCPY(labels[POINTS], IFACE_("Points"));
|
STRNCPY(labels[POINTS], IFACE_("Points"));
|
||||||
|
STRNCPY(labels[LIGHTS], IFACE_("Lights"));
|
||||||
|
|
||||||
int longest_label = 0;
|
int longest_label = 0;
|
||||||
int i;
|
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);
|
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 {
|
else {
|
||||||
stats_row(col1, labels[VERTS], col2, stats_fmt.totvert, NULL, y, height);
|
stats_row(col1, labels[VERTS], col2, stats_fmt.totvert, NULL, y, height);
|
||||||
stats_row(col1, labels[EDGES], col2, stats_fmt.totedge, NULL, y, height);
|
stats_row(col1, labels[EDGES], col2, stats_fmt.totedge, NULL, y, height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user