Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-07-06 16:07:12 +0300
committerBastien Montagne <bastien@blender.org>2020-07-06 16:09:39 +0300
commit0b07f9b71738c59b3834e2fc8b19779c72b3b020 (patch)
tree47c81a0946f76e72ec00587a8f9c0ac502360e53 /source/blender/blenkernel/BKE_idtype.h
parent99feb10b8b2ed68cb2743d3ac3464717ff65f9bd (diff)
Fix T78608: Memory leak in Material properties: "Data from SCE".
Caused by recent own refactor of cache presevation handling in readfile, EEVEE's lightcache are weird birds that can also be saved in .blend files, need a special handling for those 'persistent' caches...
Diffstat (limited to 'source/blender/blenkernel/BKE_idtype.h')
-rw-r--r--source/blender/blenkernel/BKE_idtype.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_idtype.h b/source/blender/blenkernel/BKE_idtype.h
index 705ed18df90..6cbb7571f41 100644
--- a/source/blender/blenkernel/BKE_idtype.h
+++ b/source/blender/blenkernel/BKE_idtype.h
@@ -76,9 +76,15 @@ typedef void (*IDTypeMakeLocalFunction)(struct Main *bmain, struct ID *id, const
typedef void (*IDTypeForeachIDFunction)(struct ID *id, struct LibraryForeachIDData *data);
+typedef enum eIDTypeInfoCacheCallbackFlags {
+ /** Indicates to the callback that that cache may be stored in the .blend file, so its pointer
+ * should not be cleared at readtime.*/
+ IDTYPE_CACHE_CB_FLAGS_PERSISTENT = 1 << 0,
+} eIDTypeInfoCacheCallbackFlags;
typedef void (*IDTypeForeachCacheFunctionCallback)(struct ID *id,
const struct IDCacheKey *cache_key,
void **cache_p,
+ uint flags,
void *user_data);
typedef void (*IDTypeForeachCacheFunction)(struct ID *id,
IDTypeForeachCacheFunctionCallback function_callback,