From fa8fffac1c498dc37a372e63324da48ca15c0907 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 3 Nov 2011 10:03:08 +0000 Subject: Depsgraph/Python: ensure datablocks with animation data get tagged as being updated on frame change. --- source/blender/blenkernel/intern/anim_sys.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/anim_sys.c') diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 981c20d6165..6d94b42a7ac 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -51,6 +51,7 @@ #include "BKE_animsys.h" #include "BKE_action.h" +#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_nla.h" #include "BKE_global.h" @@ -1181,6 +1182,15 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i RNA_property_update_cache_add(&new_ptr, prop); } #endif + + /* as long as we don't do property update, we still tag datablock + as having been updated. this flag does not cause any updates to + be run, it's for e.g. render engines to synchronize data */ + if(new_ptr.id.data) { + ID *id= new_ptr.id.data; + id->flag |= LIB_ID_RECALC; + DAG_id_type_tag(G.main, GS(id->name)); + } } /* successful */ @@ -2322,7 +2332,7 @@ void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime) /* particles */ EVAL_ANIM_IDS(main->particle.first, ADT_RECALC_ANIM); - /* lamps */ + /* speakers */ EVAL_ANIM_IDS(main->speaker.first, ADT_RECALC_ANIM); /* objects */ -- cgit v1.2.3