[Bf-blender-cvs] [8a2270efc52] master: Fix T81265: Animation is not evaluated when collection is included into view layer.
Bastien Montagne
noreply at git.blender.org
Thu Nov 26 11:09:50 CET 2020
Commit: 8a2270efc52a5f9de1255475ee069288ceca4195
Author: Bastien Montagne
Date: Thu Nov 26 11:08:51 2020 +0100
Branches: master
https://developer.blender.org/rB8a2270efc52a5f9de1255475ee069288ceca4195
Fix T81265: Animation is not evaluated when collection is included into view layer.
Just tag objects in un-excluded viewlayer for animation update.
===================================================================
M source/blender/makesrna/intern/rna_layer.c
===================================================================
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) {
More information about the Bf-blender-cvs
mailing list