[Bf-blender-cvs] [cb93433a566] master: Band-aid fix crash when appending an overridden collection from T103062.

Bastien Montagne noreply at git.blender.org
Mon Dec 26 12:35:14 CET 2022


Commit: cb93433a566a069de7683a5eeb3541f8292d5db2
Author: Bastien Montagne
Date:   Mon Dec 26 20:24:16 2022 +0900
Branches: master
https://developer.blender.org/rBcb93433a566a069de7683a5eeb3541f8292d5db2

Band-aid fix crash when appending an overridden collection from T103062.

This commit addresses that specific case related to Collection ID type,
using a band-aid fix which is hopefully safe enough.

T103062 will remain open as a TODO task for a proper fix later.

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

M	source/blender/blenloader/intern/readfile.cc

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

diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc
index 3481611298d..953beee6fbd 100644
--- a/source/blender/blenloader/intern/readfile.cc
+++ b/source/blender/blenloader/intern/readfile.cc
@@ -3921,6 +3921,11 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
       BKE_lib_override_library_main_validate(bfd->main, fd->reports->reports);
       BKE_lib_override_library_main_update(bfd->main);
 
+      /* FIXME Temporary 'fix' to a problem in how temp ID are copied in
+       * `BKE_lib_override_library_main_update`, see T103062.
+       * Proper fix involves first addressing T90610. */
+      BKE_main_collections_parent_relations_rebuild(bfd->main);
+
       fd->reports->duration.lib_overrides = PIL_check_seconds_timer() -
                                             fd->reports->duration.lib_overrides;
     }
@@ -4543,6 +4548,11 @@ static void library_link_end(Main *mainl, FileData **fd, const int flag)
 
   BKE_main_id_tag_all(mainvar, LIB_TAG_NEW, false);
 
+  /* FIXME Temporary 'fix' to a problem in how temp ID are copied in
+   * `BKE_lib_override_library_main_update`, see T103062.
+   * Proper fix involves first addressing T90610. */
+  BKE_main_collections_parent_relations_rebuild(mainvar);
+
   /* Make all relative paths, relative to the open blend file. */
   fix_relpaths_library(BKE_main_blendfile_path(mainvar), mainvar);



More information about the Bf-blender-cvs mailing list