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
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')
-rw-r--r--source/blender/blenloader/intern/readblenentry.c17
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c2
3 files changed, 15 insertions, 6 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) {
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 762203272a3..d91cdd5c20d 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1107,7 +1107,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, char *str, ui
continue;
if(itemptr.type && RNA_struct_is_ID(itemptr.type))
- iconid= ui_id_icon_get((bContext*)C, itemptr.data, 0);
+ iconid= ui_id_icon_get((bContext*)C, itemptr.data, 1);
else
iconid = 0;
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index aef24acc7a7..8cf6c2915c2 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -170,7 +170,7 @@ static void id_search_cb(const bContext *C, void *arg_template, char *str, uiSea
continue;
if(BLI_strcasestr(id->name+2, str)) {
- iconid= ui_id_icon_get((bContext*)C, id, 0);
+ iconid= ui_id_icon_get((bContext*)C, id, 1);
if(!uiSearchItemAdd(items, id->name+2, id, iconid))
break;