Assets: Generate light preview when making light object an asset

We already supported previews for lights, just didn't actually use them
when making a light object an asset. They were only used when making the
light data itself an asset.
This commit is contained in:
Julian Eisel
2021-11-22 21:02:46 +01:00
parent 34615cd269
commit 481f032f5c

View File

@@ -2041,6 +2041,14 @@ void UI_icon_render_id(
return;
}
/* For objects, first try if a preview can created via the object data. */
if (GS(id->name) == ID_OB) {
Object *ob = (Object *)id;
if (ED_preview_id_is_supported(ob->data)) {
id = ob->data;
}
}
if (!ED_preview_id_is_supported(id)) {
return;
}