Make new library IDs named from the .blend file.
Now that we do use that ID name of them in UI sometimes...
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user