Fix T89835: Crash after Instancing to Scene after making linked Collection local.

Even though the ID itself remain the same after being made local, from
depsgraph point of view this is a different ID. Hence we need to tag all
of its users for COW update, as well as rebuild depsgraph relationships.

Should be also backported to LTS 2.93 (and 2.83 if possible).
This commit is contained in:
Bastien Montagne 2021-08-05 11:29:46 +02:00 committed by Jeroen Bakker
parent a70b625a10
commit bca66a2a71
Notes: blender-bot 2023-02-14 01:35:49 +01:00
Referenced by issue #89835, Crash after Instancing to Scene after making linked Collection local
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 3 additions and 0 deletions

View File

@ -126,6 +126,7 @@
#include "BKE_world.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "RNA_access.h"
@ -231,6 +232,8 @@ static void lib_id_clear_library_data_ex(Main *bmain, ID *id)
if (key != NULL) {
lib_id_clear_library_data_ex(bmain, &key->id);
}
DEG_relations_tag_update(bmain);
}
void BKE_lib_id_clear_library_data(Main *bmain, ID *id)