[Bf-blender-cvs] [358f8b484fa] master: Writefile: Cleanup Collection runtime data.
Bastien Montagne
noreply at git.blender.org
Wed Apr 1 14:27:37 CEST 2020
Commit: 358f8b484fa0b786d905aac54c19603aca0d0f07
Author: Bastien Montagne
Date: Wed Apr 1 11:50:42 2020 +0200
Branches: master
https://developer.blender.org/rB358f8b484fa0b786d905aac54c19603aca0d0f07
Writefile: Cleanup Collection runtime data.
===================================================================
M source/blender/blenloader/intern/writefile.c
===================================================================
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index e5209281d2b..4a2f6875c83 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2467,6 +2467,12 @@ static void write_collection_nolib(WriteData *wd, Collection *collection)
static void write_collection(WriteData *wd, Collection *collection, const void *id_address)
{
if (collection->id.us > 0 || wd->use_memfile) {
+ /* Clean up, important in undo case to reduce false detection of changed datablocks. */
+ collection->flag &= ~COLLECTION_HAS_OBJECT_CACHE;
+ collection->tag = 0;
+ BLI_listbase_clear(&collection->object_cache);
+ BLI_listbase_clear(&collection->parents);
+
/* write LibData */
writestruct_at_address(wd, ID_GR, Collection, 1, id_address, collection);
write_iddata(wd, &collection->id);
More information about the Bf-blender-cvs
mailing list