From 3db490d20fd37be39723dcfabf4d103ed6837e2f Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Sat, 15 May 2010 10:37:21 +0000 Subject: Make creating and saving previews for Lamp, World, Texture, Material and Image datablocks consistent. - For now the larger previews are created at the same time the small preview icons are created - This brings back the previews when appending/linking --- source/blender/blenloader/intern/readblenentry.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index 6424829c12a..38e9a584952 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -239,10 +239,19 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype) for (bhead= blo_firstbhead(fd); bhead; bhead= blo_nextbhead(fd, bhead)) { if (bhead->code==ofblocktype) { ID *id= (ID*) (bhead+1); - if ( (GS(id->name) == ID_MA) || (GS(id->name) == ID_TE)) { - new_prv = MEM_callocN(sizeof(PreviewImage), "newpreview"); - BLI_linklist_prepend(&previews, new_prv); - looking = 1; + switch(GS(id->name)) + { + case ID_MA: /* fall through */ + case ID_TE: /* fall through */ + case ID_IM: /* fall through */ + case ID_WO: /* fall through */ + case ID_LA: /* fall through */ + new_prv = MEM_callocN(sizeof(PreviewImage), "newpreview"); + BLI_linklist_prepend(&previews, new_prv); + looking = 1; + break; + default: + break; } } else if (bhead->code==DATA) { if (looking) { -- cgit v1.2.3