[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28779] trunk/blender/source/blender: Make creating and saving previews for Lamp, World, Texture, Material and Image datablocks consistent.
Andrea Weikert
elubie at gmx.net
Sat May 15 12:37:22 CEST 2010
Revision: 28779
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28779
Author: elubie
Date: 2010-05-15 12:37:21 +0200 (Sat, 15 May 2010)
Log Message:
-----------
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
Modified Paths:
--------------
trunk/blender/source/blender/blenloader/intern/readblenentry.c
trunk/blender/source/blender/editors/interface/interface_layout.c
trunk/blender/source/blender/editors/interface/interface_templates.c
Modified: trunk/blender/source/blender/blenloader/intern/readblenentry.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readblenentry.c 2010-05-15 03:55:34 UTC (rev 28778)
+++ trunk/blender/source/blender/blenloader/intern/readblenentry.c 2010-05-15 10:37:21 UTC (rev 28779)
@@ -239,10 +239,19 @@
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) {
Modified: trunk/blender/source/blender/editors/interface/interface_layout.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_layout.c 2010-05-15 03:55:34 UTC (rev 28778)
+++ trunk/blender/source/blender/editors/interface/interface_layout.c 2010-05-15 10:37:21 UTC (rev 28779)
@@ -1107,7 +1107,7 @@
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;
Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_templates.c 2010-05-15 03:55:34 UTC (rev 28778)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c 2010-05-15 10:37:21 UTC (rev 28779)
@@ -170,7 +170,7 @@
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;
More information about the Bf-blender-cvs
mailing list