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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-12 17:38:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-12 17:38:00 +0300
commita41694938231a108ed414561311663c3c4ae7c4c (patch)
treefa491b06eebd640b88bde199ac82e150d5c89a3b /source/blender/editors/space_file/filelist.c
parentc678bd2d7de115945e5df83b11742a62582c4d40 (diff)
- BKE_idcode_iter_step() - function to step over all ID codes.
- BLO_blendhandle_get_datablock_names() now takes an arg for the total items in the list, saves the caller counting.
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r--source/blender/editors/space_file/filelist.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index bd188d07a86..0eee8eb0712 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -997,16 +997,15 @@ void filelist_from_library(struct FileList* filelist)
previews = NULL;
if (idcode) {
previews= BLO_blendhandle_get_previews(filelist->libfiledata, idcode);
- names= BLO_blendhandle_get_datablock_names(filelist->libfiledata, idcode);
+ names= BLO_blendhandle_get_datablock_names(filelist->libfiledata, idcode, &nnames);
/* ugh, no rewind, need to reopen */
BLO_blendhandle_close(filelist->libfiledata);
filelist->libfiledata= BLO_blendhandle_from_file(dir);
} else {
names= BLO_blendhandle_get_linkable_groups(filelist->libfiledata);
+ nnames= BLI_linklist_length(names);
}
-
- nnames= BLI_linklist_length(names);
filelist->numfiles= nnames + 1;
filelist->filelist= malloc(filelist->numfiles * sizeof(*filelist->filelist));