diff options
Diffstat (limited to 'source/blender/blenkernel/intern/movieclip.c')
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 18 |
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 *************************/ |