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:55:13 +0300
committerBastien Montagne <bastien@blender.org>2020-07-03 18:01:21 +0300
commit1bdabd7b4f0d2db9b06110ad4ca92522d782f5dc (patch)
tree7d845dadffceaedc443ad47ecbf28e392a50636b /source/blender/blenkernel/intern/movieclip.c
parent1019c9f582f2cb588eea16ac0e23abea71de6308 (diff)
Move MovieClip to new undo cache management system.
Diffstat (limited to 'source/blender/blenkernel/intern/movieclip.c')
-rw-r--r--source/blender/blenkernel/intern/movieclip.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index f0efc9b8c50..d36f5ed0329 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -129,6 +129,23 @@ static void movie_clip_foreach_id(ID *id, LibraryForeachIDData *data)
}
}
+static void movie_clip_foreach_cache(ID *id,
+ IDTypeForeachCacheFunctionCallback function_callback,
+ void *user_data)
+{
+ MovieClip *movie_clip = (MovieClip *)id;
+ IDCacheKey key = {
+ .id_session_uuid = id->session_uuid,
+ .offset_in_ID = offsetof(MovieClip, cache),
+ .cache_v = movie_clip->cache,
+ };
+ function_callback(id, &key, (void **)&movie_clip->cache, user_data);
+
+ key.offset_in_ID = offsetof(MovieClip, tracking.camera.intrinsics);
+ key.cache_v = movie_clip->tracking.camera.intrinsics;
+ function_callback(id, &key, (void **)&movie_clip->tracking.camera.intrinsics, user_data);
+}
+
IDTypeInfo IDType_ID_MC = {
.id_code = ID_MC,
.id_filter = FILTER_ID_MC,
@@ -144,6 +161,7 @@ IDTypeInfo IDType_ID_MC = {
.free_data = movie_clip_free_data,
.make_local = NULL,
.foreach_id = movie_clip_foreach_id,
+ .foreach_cache = movie_clip_foreach_cache,
};
/*********************** movieclip buffer loaders *************************/