[Bf-blender-cvs] [06c5a9426aa] blender2.8: Make new library IDs named from the .blend file.

Bastien Montagne noreply at git.blender.org
Wed Oct 31 13:39:39 CET 2018


Commit: 06c5a9426aafeeeb735ea7182eec3992cc9a5d64
Author: Bastien Montagne
Date:   Wed Oct 31 12:41:38 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB06c5a9426aafeeeb735ea7182eec3992cc9a5d64

Make new library IDs named from the .blend file.

Now that we do use that ID name of them in UI sometimes...

===================================================================

M	source/blender/blenloader/intern/readfile.c

===================================================================

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));



More information about the Bf-blender-cvs mailing list