diff options
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index aa3362aa211..de7353d827a 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2424,7 +2424,9 @@ static void direct_link_id_common( id->session_uuid = MAIN_ID_SESSION_UUID_UNSET; } - BKE_lib_libblock_session_uuid_ensure(id); + if ((tag & LIB_TAG_TEMP_MAIN) == 0) { + BKE_lib_libblock_session_uuid_ensure(id); + } id->lib = current_library; id->us = ID_FAKE_USERS(id); @@ -3168,7 +3170,9 @@ static ID *create_placeholder(Main *mainvar, const short idcode, const char *idn BLI_addtail(lb, ph_id); id_sort_by_name(lb, ph_id, NULL); - BKE_lib_libblock_session_uuid_ensure(ph_id); + if ((tag & LIB_TAG_TEMP_MAIN) == 0) { + BKE_lib_libblock_session_uuid_ensure(ph_id); + } return ph_id; } @@ -4998,6 +5002,11 @@ static Main *library_link_begin( { Main *mainl; + /* Only allow specific tags to be set as extra, + * otherwise this could conflict with library loading logic. + * Other flags can be added here, as long as they are safe. */ + BLI_assert((id_tag_extra & ~LIB_TAG_TEMP_MAIN) == 0); + (*fd)->id_tag_extra = id_tag_extra; (*fd)->mainlist = MEM_callocN(sizeof(ListBase), "FileData.mainlist"); |