From 659ccd9cd2ee79c462147b53c18ecc8b9faf74a6 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 16 Sep 2019 14:52:06 +0200 Subject: Fix T66154: viewlayer hide/exclude settings getting lost for linked collections The problem was that the object and collection pointers in Base and LayerCollection would get lost of file read. Normally such ID pointers would be resolved by pointing to an ID_ID placeholder which has the datablock name, and then replacing it will the real datablock. However ID_ID is only written for directly linked datablocks. This adds the concept of an indirectly linked datablock with a weak reference to it. For this we write an ID_ID_WEAK_REF code, which is a reference that will only be resolved if the datablock was read for another reason. Differential Revision: https://developer.blender.org/D4416 --- source/blender/blenkernel/BKE_library.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/BKE_library.h') diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index 5a4a3f29a93..71799bf74f6 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -175,6 +175,7 @@ void BKE_libblock_management_usercounts_clear(struct Main *bmain, void *idv); void BKE_id_lib_local_paths(struct Main *bmain, struct Library *lib, struct ID *id); void id_lib_extern(struct ID *id); +void id_lib_indirect_weak_link(struct ID *id); void BKE_library_filepath_set(struct Main *bmain, struct Library *lib, const char *filepath); void id_us_ensure_real(struct ID *id); void id_us_clear_real(struct ID *id); -- cgit v1.2.3