From 06c5a9426aafeeeb735ea7182eec3992cc9a5d64 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 31 Oct 2018 12:41:38 +0100 Subject: Make new library IDs named from the .blend file. Now that we do use that ID name of them in UI sometimes... --- source/blender/blenloader/intern/readfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenloader') 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)); -- cgit v1.2.3