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-11-26 13:08:51 +0300
committerBastien Montagne <bastien@blender.org>2020-11-26 13:08:51 +0300
commit8a2270efc52a5f9de1255475ee069288ceca4195 (patch)
tree4f5b9f1ff30efc573a59b2b77861eaf6abc27bb3 /source/blender/makesrna/intern/rna_layer.c
parent774d18804fe3de51c601f3f0684218cd6af1db09 (diff)
Fix T81265: Animation is not evaluated when collection is included into view layer.
Just tag objects in un-excluded viewlayer for animation update.
Diffstat (limited to 'source/blender/makesrna/intern/rna_layer.c')
-rw-r--r--source/blender/makesrna/intern/rna_layer.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c
index 54ee49be65e..b2d0c4bc8c0 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -306,7 +306,16 @@ static void rna_LayerCollection_exclude_update(Main *bmain, Scene *UNUSED(scene)
BKE_layer_collection_sync(scene, view_layer);
- DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS);
+ DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS | ID_RECALC_ANIMATION);
+ if (!exclude) {
+ /* We need to update animation of objects added back to the scene through enabling this view
+ * layer. */
+ FOREACH_OBJECT_BEGIN (view_layer, ob) {
+ DEG_id_tag_update(&ob->id, ID_RECALC_ANIMATION);
+ }
+ FOREACH_OBJECT_END;
+ }
+
DEG_relations_tag_update(bmain);
WM_main_add_notifier(NC_SCENE | ND_LAYER_CONTENT, NULL);
if (exclude) {