diff options
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 2dad108e320..ad41e9a7fb7 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -93,6 +93,7 @@ #include "BKE_text.h" #include "BKE_texture.h" #include "BKE_scene.h" +#include "BKE_icons.h" #include "BKE_image.h" #include "BKE_ipo.h" #include "BKE_key.h" @@ -334,6 +335,7 @@ void *alloc_libblock(ListBase *lb, short type, char *name) if(id) { BLI_addtail(lb, id); id->us= 1; + id->icon_id = 0; *( (short *)id->name )= type; new_id(lb, id, name); /* alphabetic insterion: is in new_id */ @@ -573,6 +575,20 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor sprintf(buf, "%%x%d", i+1); BLI_dynstr_append(pupds, buf); + 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 */ + sprintf(buf, "%%i%d", BKE_icon_getid(id) ); + BLI_dynstr_append(pupds, buf); + break; + default: + break; + } + if(id->next) BLI_dynstr_append(pupds, "|"); } |