Fix T93353: Reload Library used as source for liboverride loses Constraints.

Liboverride properties and operations list need to be fully up-to-date
before libraries are reloaded, otherwise re-applying those liboverrides
after linked data is reloaded may miss some changes.
This commit is contained in:
Bastien Montagne 2021-11-25 14:50:34 +01:00
parent 3bf10e5d0a
commit e253fb2143
Notes: blender-bot 2023-02-14 06:00:45 +01:00
Referenced by issue #93402, Linking Collections links additional objects
Referenced by issue #93353, Reload Library Override file loses Constraints
1 changed files with 5 additions and 0 deletions

View File

@ -1541,6 +1541,11 @@ static void lib_relocate_do(bContext *C,
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
/* All override rules need to be up to date, since there will be no do_version here, otherwise
* older, now-invalid rules might be applied and likely fail, or some changes might be missing,
* etc. See T93353. */
BKE_lib_override_library_main_operations_create(bmain, true);
/* Remove all IDs to be reloaded from Main. */
lba_idx = set_listbasepointers(bmain, lbarray);
while (lba_idx--) {