diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-08-18 14:18:50 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-08-18 14:18:50 +0300 |
commit | 2735f6fda66076c34f853afaccfc4dd78f66ca1f (patch) | |
tree | 780b8bb1525213a58fe6ec43b04bf8b4a3d3421d /source/blender/editors/space_file/filelist.c | |
parent | d85e94da07d3d8bb213ef2e3d98c2032edad7155 (diff) |
Replace 'BLO_is_a_library' by 'BLO_library_path_explode'.
This new func will be fully used by upcomming code (it mostly adds
the extraction of library item name as well as library file and ID group).
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 3358812796e..21a072d0adf 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -470,9 +470,9 @@ static bool is_filtered_file(struct direntry *file, const char *UNUSED(root), Fi static bool is_filtered_lib(struct direntry *file, const char *root, FileListFilter *filter) { bool is_filtered = !is_hidden_file(file->relname, filter); - char dir[FILE_MAXDIR], group[BLO_GROUP_MAX]; + char dir[FILE_MAXDIR]; - if (BLO_is_a_library(root, dir, group)) { + if (BLO_library_path_explode(root, dir, NULL, NULL)) { is_filtered = !is_hidden_file(file->relname, filter); if (is_filtered && filter->filter && !FILENAME_IS_CURRPAR(file->relname)) { if (is_filtered && (filter->filter_search[0] != '\0')) { @@ -1044,9 +1044,9 @@ bool filelist_is_selected(struct FileList *filelist, int index, FileCheckType ch } -bool filelist_islibrary(struct FileList *filelist, char *dir, char *group) +bool filelist_islibrary(struct FileList *filelist, char *dir, char **group) { - return BLO_is_a_library(filelist->dir, dir, group); + return BLO_library_path_explode(filelist->dir, dir, group, NULL); } static int groupname_to_code(const char *group) @@ -1068,10 +1068,10 @@ static void filelist_from_library(struct FileList *filelist) struct ImBuf *ima; int ok, i, nprevs, nnames, idcode; char filename[FILE_MAX]; - char dir[FILE_MAX], group[BLO_GROUP_MAX]; + char dir[FILE_MAX], *group; /* name test */ - ok = filelist_islibrary(filelist, dir, group); + ok = filelist_islibrary(filelist, dir, &group); if (!ok) { /* free */ if (filelist->libfiledata) BLO_blendhandle_close(filelist->libfiledata); @@ -1088,7 +1088,7 @@ static void filelist_from_library(struct FileList *filelist) if (filelist->libfiledata == NULL) return; } - idcode = groupname_to_code(group); + idcode = group ? groupname_to_code(group) : 0; /* memory for strings is passed into filelist[i].relname * and freed in freefilelist */ |