diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-31 14:41:38 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-31 15:34:06 +0300 |
commit | 06c5a9426aafeeeb735ea7182eec3992cc9a5d64 (patch) | |
tree | ea5811a0969fa41206d3e47b2364208ada3d90d9 /source/blender/blenloader | |
parent | 08a92d8578ea57109406022f75bc7b123e9cbcbb (diff) |
Make new library IDs named from the .blend file.
Now that we do use that ID name of them in UI sometimes...
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 84a57e9449a..ddda9eb610e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -674,7 +674,7 @@ static Main *blo_find_main(FileData *fd, const char *filepath, const char *relab /* Add library datablock itself to 'main' Main, since libraries are **never** linked data. * Fixes bug where you could end with all ID_LI datablocks having the same name... */ - lib = BKE_libblock_alloc(mainlist->first, ID_LI, "Lib", 0); + lib = BKE_libblock_alloc(mainlist->first, ID_LI, BLI_path_basename(filepath), 0); lib->id.us = ID_FAKE_USERS(lib); /* Important, consistency with main ID reading code from read_libblock(). */ BLI_strncpy(lib->name, filepath, sizeof(lib->name)); BLI_strncpy(lib->filepath, name1, sizeof(lib->filepath)); |