diff options
Diffstat (limited to 'source/blender/blenloader/intern/readblenentry.c')
-rw-r--r-- | source/blender/blenloader/intern/readblenentry.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index eda0ac1c375..4a8ef3a9317 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -123,21 +123,24 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp) fprintf(fp, "]\n"); } -LinkNode *BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype) +LinkNode *BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype, int *tot_names) { FileData *fd= (FileData*) bh; LinkNode *names= NULL; BHead *bhead; + int tot= 0; for (bhead= blo_firstbhead(fd); bhead; bhead= blo_nextbhead(fd, bhead)) { if (bhead->code==ofblocktype) { char *idname= bhead_id_name(fd, bhead); - + BLI_linklist_prepend(&names, strdup(idname+2)); + tot++; } else if (bhead->code==ENDB) break; } - + + *tot_names= tot; return names; } |