Commit: bca66a2a71e8a1fb32f05f544516d3fcb699fe00
Author: Bastien Montagne
Date:   Thu Aug 5 11:29:46 2021 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBbca66a2a71e8a1fb32f05f544516d3fcb699fe00

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).

===================================================================

M       source/blender/blenkernel/intern/lib_id.c

===================================================================

diff --git a/source/blender/blenkernel/intern/lib_id.c 
b/source/blender/blenkernel/intern/lib_id.c
index fcdc28d3acd..83709631897 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -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)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to