[Bf-blender-cvs] [4a86eb4] depsgraph_refactor: Depsgraph: Inserting keyframes for the first time now rebuilds the depsgraph

Joshua Leung noreply at git.blender.org
Sat Jan 24 00:39:19 CET 2015


Commit: 4a86eb41240056acdc4a7e378befdca7a46c5358
Author: Joshua Leung
Date:   Sat Jan 24 12:39:08 2015 +1300
Branches: depsgraph_refactor
https://developer.blender.org/rB4a86eb41240056acdc4a7e378befdca7a46c5358

Depsgraph: Inserting keyframes for the first time now rebuilds the depsgraph

Since animation playback now works only if there's a link to the time source node,
it is necessary to rebuild the depsgraph when animation gets added to a datablock
for the first time (i.e. when keyframing on a previously unkeyed datablock) to
ensure that such a link gets added. It is not however needed to keep adding this
on subsequent keyframing attempts.

===================================================================

M	source/blender/editors/animation/keyframing.c

===================================================================

diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 7e2ce4c..a954ae2 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -152,6 +152,10 @@ bAction *verify_adt_action(ID *id, short add)
 		 * to the wrong places
 		 */
 		adt->action->idroot = GS(id->name);
+
+		/* tag depsgraph to be rebuilt to include time dependency */
+		/* XXX: we probably should have bmain passed down, but that involves altering too many API's */
+		DAG_relations_tag_update(G.main);
 	}
 		
 	/* return the action */




More information about the Bf-blender-cvs mailing list