diff options
author | Julian Eisel <julian@blender.org> | 2021-11-22 23:02:46 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-11-22 23:14:11 +0300 |
commit | 481f032f5cbe2cd3c36c9ef516670fd9e06db25f (patch) | |
tree | b18fe1ba5f20de3a74d8738426ef0722175ffa0f | |
parent | 34615cd269a6cd26cacbab3f10a7298fd577721d (diff) |
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.
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index c335632faae..6f119d55d3c 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -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; } |