[Bf-blender-cvs] [a603f3ad53e] lanpr-under-gp: LineArt: Instanced collection child function bug.

YimingWu noreply at git.blender.org
Mon Sep 21 17:52:55 CEST 2020


Commit: a603f3ad53eb79565bdbad32770e3f5161035bf7
Author: YimingWu
Date:   Mon Sep 21 23:52:35 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rBa603f3ad53eb79565bdbad32770e3f5161035bf7

LineArt: Instanced collection child function bug.

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

M	source/blender/blenkernel/intern/collection.c
M	source/blender/makesdna/DNA_collection_types.h

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

diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 812e661fd85..ac21b143b4d 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -622,11 +622,11 @@ ListBase BKE_collection_object_cache_get(Collection *collection)
 
 ListBase BKE_collection_object_cache_instanced_get(Collection *collection)
 {
-  if (!(collection->flag & COLLECTION_HAS_OBJECT_CACHE)) {
+  if (!(collection->flag & COLLECTION_HAS_OBJECT_CACHE_INSTANCED)) {
     static ThreadMutex cache_lock = BLI_MUTEX_INITIALIZER;
 
     BLI_mutex_lock(&cache_lock);
-    if (!(collection->flag & COLLECTION_HAS_OBJECT_CACHE)) {
+    if (!(collection->flag & COLLECTION_HAS_OBJECT_CACHE_INSTANCED)) {
       collection_object_cache_fill(&collection->object_cache_instanced, collection, 0, true);
       collection->flag |= COLLECTION_HAS_OBJECT_CACHE_INSTANCED;
     }
diff --git a/source/blender/makesdna/DNA_collection_types.h b/source/blender/makesdna/DNA_collection_types.h
index 0696a3dfb96..2cc052b2f67 100644
--- a/source/blender/makesdna/DNA_collection_types.h
+++ b/source/blender/makesdna/DNA_collection_types.h
@@ -97,7 +97,7 @@ enum {
   COLLECTION_RESTRICT_RENDER = (1 << 3),           /* Disable in renders. */
   COLLECTION_HAS_OBJECT_CACHE = (1 << 4),          /* Runtime: object_cache is populated. */
   COLLECTION_IS_MASTER = (1 << 5), /* Is master collection embedded in the scene. */
-  COLLECTION_HAS_OBJECT_CACHE_INSTANCED = (1 << 4), /* for object_cache_instanced. */
+  COLLECTION_HAS_OBJECT_CACHE_INSTANCED = (1 << 6), /* for object_cache_instanced. */
 };
 
 /* Collection->tag */



More information about the Bf-blender-cvs mailing list