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:
Diffstat (limited to 'source/blender/blenkernel/BKE_idtype.h')
-rw-r--r--source/blender/blenkernel/BKE_idtype.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_idtype.h b/source/blender/blenkernel/BKE_idtype.h
index b6dfadd3b2a..56e788ccfe8 100644
--- a/source/blender/blenkernel/BKE_idtype.h
+++ b/source/blender/blenkernel/BKE_idtype.h
@@ -46,6 +46,19 @@ enum {
IDTYPE_FLAGS_NO_MAKELOCAL = 1 << 2,
};
+typedef struct IDCacheKey {
+ /* The session uuid of the ID owning the cached data. */
+ unsigned int id_session_uuid;
+ /* Value uniquely indentifying the cache whithin its ID.
+ * Typically the offset of its member in the data-block struct, but can be anything. */
+ size_t offset_in_ID;
+ /* Actual address of the cached data to save and restore. */
+ void *cache_v;
+} IDCacheKey;
+
+uint BKE_idtype_cache_key_hash(const void *key_v);
+bool BKE_idtype_cache_key_cmp(const void *key_a_v, const void *key_b_v);
+
/* ********** Prototypes for IDTypeInfo callbacks. ********** */
typedef void (*IDTypeInitDataFunction)(struct ID *id);