mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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:
parent
34615cd269
commit
481f032f5c
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue