Fix T77853: Error reloading linked library.
Issue related to how ID refcounting was changed when loading blendfile data...
This commit is contained in:
parent
cf42721fe2
commit
eadbdf170a
Notes:
blender-bot
2023-02-14 05:52:32 +01:00
Referenced by issue #77853, Error reloading linked library Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -759,6 +759,10 @@ static void lib_relocate_do(Main *bmain,
|
|||
BLI_addtail(which_libbase(bmain, GS(old_id->name)), old_id);
|
||||
}
|
||||
|
||||
/* Since our (old) reloaded IDs were removed from main, the user count done for them in linking
|
||||
* code is wrong, we need to redo it here after adding them back to main. */
|
||||
BKE_main_id_refcount_recompute(bmain, false);
|
||||
|
||||
/* Note that in reload case, we also want to replace indirect usages. */
|
||||
const short remap_flags = ID_REMAP_SKIP_NEVER_NULL_USAGE |
|
||||
ID_REMAP_NO_INDIRECT_PROXY_DATA_USAGE |
|
||||
|
|
Loading…
Reference in New Issue