[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41489] trunk/blender/source/blender/ blenkernel/intern: Depsgraph/Python: ensure datablocks with animation data get tagged as being
Brecht Van Lommel
brechtvanlommel at pandora.be
Thu Nov 3 11:03:08 CET 2011
Revision: 41489
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41489
Author: blendix
Date: 2011-11-03 10:03:08 +0000 (Thu, 03 Nov 2011)
Log Message:
-----------
Depsgraph/Python: ensure datablocks with animation data get tagged as being
updated on frame change.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/anim_sys.c
trunk/blender/source/blender/blenkernel/intern/scene.c
Modified: trunk/blender/source/blender/blenkernel/intern/anim_sys.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/anim_sys.c 2011-11-03 09:20:54 UTC (rev 41488)
+++ trunk/blender/source/blender/blenkernel/intern/anim_sys.c 2011-11-03 10:03:08 UTC (rev 41489)
@@ -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 @@
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 @@
/* particles */
EVAL_ANIM_IDS(main->particle.first, ADT_RECALC_ANIM);
- /* lamps */
+ /* speakers */
EVAL_ANIM_IDS(main->speaker.first, ADT_RECALC_ANIM);
/* objects */
Modified: trunk/blender/source/blender/blenkernel/intern/scene.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/scene.c 2011-11-03 09:20:54 UTC (rev 41488)
+++ trunk/blender/source/blender/blenkernel/intern/scene.c 2011-11-03 10:03:08 UTC (rev 41489)
@@ -1067,6 +1067,8 @@
/* keep this last */
BLI_exec_cb(bmain, (ID *)sce, BLI_CB_EVT_SCENE_UPDATE_POST);
BLI_exec_cb(bmain, (ID *)sce, BLI_CB_EVT_FRAME_CHANGE_POST);
+
+ DAG_ids_clear_recalc(bmain);
}
/* return default layer, also used to patch old files */
More information about the Bf-blender-cvs
mailing list