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-03 17:09:58 +0300
committerBastien Montagne <bastien@blender.org>2020-07-03 17:10:33 +0300
commit3a59c184b98a729ccaa1261d1252e084167f7a32 (patch)
tree0275fa44c836d394bfba99d8aef5eeb3610e00e3 /source/blender/blenkernel/intern/scene.c
parenta33756d783a99a29aa77373c726a598ec50af80a (diff)
Move Scene's cache management during undo to new system.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index b0faa555f29..7f3d6eb0372 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -570,6 +570,20 @@ static void scene_foreach_id(ID *id, LibraryForeachIDData *data)
}
}
+static void scene_foreach_cache(ID *id,
+ IDTypeForeachCacheFunctionCallback function_callback,
+ void *user_data)
+{
+ Scene *scene = (Scene *)id;
+ IDCacheKey key = {
+ .id_session_uuid = id->session_uuid,
+ .offset_in_ID = offsetof(Scene, eevee.light_cache_data),
+ .cache_v = scene->eevee.light_cache_data,
+ };
+
+ function_callback(id, &key, (void **)&scene->eevee.light_cache_data, user_data);
+}
+
IDTypeInfo IDType_ID_SCE = {
.id_code = ID_SCE,
.id_filter = FILTER_ID_SCE,
@@ -587,6 +601,7 @@ IDTypeInfo IDType_ID_SCE = {
* support all possible corner cases. */
.make_local = NULL,
.foreach_id = scene_foreach_id,
+ .foreach_cache = scene_foreach_cache,
};
const char *RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE";