diff options
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 11cdf67cb82..239e2dc47a0 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1687,6 +1687,19 @@ static void scene_undo_preserve(BlendLibReader *reader, ID *id_new, ID *id_old) } } +static void scene_lib_override_apply_post(ID *id_dst, ID *UNUSED(id_src)) +{ + Scene *scene = (Scene *)id_dst; + + if (scene->rigidbody_world != NULL) { + PTCacheID pid; + BKE_ptcache_id_from_rigidbody(&pid, NULL, scene->rigidbody_world); + LISTBASE_FOREACH (PointCache *, point_cache, pid.ptcaches) { + point_cache->flag |= PTCACHE_FLAG_INFO_DIRTY; + } + } +} + IDTypeInfo IDType_ID_SCE = { .id_code = ID_SCE, .id_filter = FILTER_ID_SCE, @@ -1712,6 +1725,8 @@ IDTypeInfo IDType_ID_SCE = { .blend_read_expand = scene_blend_read_expand, .blend_read_undo_preserve = scene_undo_preserve, + + .lib_override_apply_post = scene_lib_override_apply_post, }; const char *RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE"; |