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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user