Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Weikert <elubie@gmx.net>2010-05-15 14:37:21 +0400
committerAndrea Weikert <elubie@gmx.net>2010-05-15 14:37:21 +0400
commit3db490d20fd37be39723dcfabf4d103ed6837e2f (patch)
tree34934fdec93577934927c47e384dfa95cfb8ca25 /source/blender/blenloader/intern/readblenentry.c
parent21bc4114dfb875d2cf9a9db3ea6ba163ef553591 (diff)
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
Diffstat (limited to 'source/blender/blenloader/intern/readblenentry.c')
-rw-r--r--source/blender/blenloader/intern/readblenentry.c17
1 files changed, 13 insertions, 4 deletions
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) {