[Bf-blender-cvs] [74af6987699] blender-v2.81-release: Fix T70875: Library Override: Clicking an Library Overriden Object crashes Blender.

Bastien Montagne noreply at git.blender.org
Thu Nov 7 16:19:13 CET 2019


Commit: 74af6987699a5064cb95d15b6bd318d1ea2f5976
Author: Bastien Montagne
Date:   Thu Nov 7 16:09:58 2019 +0100
Branches: blender-v2.81-release
https://developer.blender.org/rB74af6987699a5064cb95d15b6bd318d1ea2f5976

Fix T70875: Library Override: Clicking an Library Overriden Object crashes Blender.

We also need to rebuild the whole collection/viewlayer object cache
thing when we relink an objector collection in a collection (since it
might be part of a view layer).

Again, usual disclaimer about how inneficient this is currently, needs a
serious refactor to only tag caches as dirty, and actually rebuild the
whole thing on access.

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

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

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

diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index 45dbb4b6ec1..be283c68911 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -677,7 +677,8 @@ void BKE_libblock_relink_ex(
    * Maybe we should do a per-ID callback for this instead?
    */
   switch (GS(id->name)) {
-    case ID_SCE: {
+    case ID_SCE:
+    case ID_GR: {
       if (old_id) {
         switch (GS(old_id->name)) {
           case ID_OB:
@@ -707,6 +708,8 @@ void BKE_libblock_relink_ex(
     default:
       break;
   }
+
+  DEG_relations_tag_update(bmain);
 }
 
 static int id_relink_to_newid_looper(void *UNUSED(user_data),



More information about the Bf-blender-cvs mailing list