[Bf-blender-cvs] [33f24a5db2c] lanpr-under-gp: Line Art: file r/w pointer clean-up for collection->object_cache_instanced.

YimingWu noreply at git.blender.org
Fri Aug 14 09:37:25 CEST 2020


Commit: 33f24a5db2c209da379a3a068e192ce6dcf27d4c
Author: YimingWu
Date:   Fri Aug 14 14:57:48 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB33f24a5db2c209da379a3a068e192ce6dcf27d4c

Line Art: file r/w pointer clean-up for collection->object_cache_instanced.

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

M	source/blender/blenkernel/intern/collection.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/writefile.c

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

diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 694bb068717..6adaec98606 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -109,6 +109,7 @@ static void collection_copy_data(Main *bmain, ID *id_dst, const ID *id_src, cons
 
   collection_dst->flag &= ~COLLECTION_HAS_OBJECT_CACHE;
   BLI_listbase_clear(&collection_dst->object_cache);
+  BLI_listbase_clear(&collection_dst->object_cache_instanced);
 
   BLI_listbase_clear(&collection_dst->gobject);
   BLI_listbase_clear(&collection_dst->children);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 55d92b05539..7e6f3f3410d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5932,6 +5932,7 @@ static void direct_link_collection(BlendDataReader *reader, Collection *collecti
   collection->flag &= ~COLLECTION_HAS_OBJECT_CACHE;
   collection->tag = 0;
   BLI_listbase_clear(&collection->object_cache);
+  BLI_listbase_clear(&collection->object_cache_instanced);
   BLI_listbase_clear(&collection->parents);
 
 #ifdef USE_COLLECTION_COMPAT_28
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index c28ebf309d2..fb848b28a76 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2407,6 +2407,7 @@ static void write_collection(BlendWriter *writer, Collection *collection, const
     collection->flag &= ~COLLECTION_HAS_OBJECT_CACHE;
     collection->tag = 0;
     BLI_listbase_clear(&collection->object_cache);
+    BLI_listbase_clear(&collection->object_cache_instanced);
     BLI_listbase_clear(&collection->parents);
 
     /* write LibData */



More information about the Bf-blender-cvs mailing list