[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15096] trunk/blender/source/blender/src/ editaction.c: Bugfix #13603:

Joshua Leung aligorith at gmail.com
Tue Jun 3 12:00:11 CEST 2008


Revision: 15096
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15096
Author:   aligorith
Date:     2008-06-03 12:00:09 +0200 (Tue, 03 Jun 2008)

Log Message:
-----------
Bugfix #13603:

Action Editor Copy/Paste didn't trigger a depsgraph update for the active object (if the action was applied to it).

Modified Paths:
--------------
    trunk/blender/source/blender/src/editaction.c

Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c	2008-06-03 09:42:18 UTC (rev 15095)
+++ trunk/blender/source/blender/src/editaction.c	2008-06-03 10:00:09 UTC (rev 15096)
@@ -1485,7 +1485,7 @@
 	data= get_action_context(&datatype);
 	if (data == NULL) return;
 	cfra = frame_to_float(CFRA);
-		
+	
 	if (datatype == ACTCONT_ACTION) {
 		ListBase act_data = {NULL, NULL};
 		bActListElem *ale;
@@ -1941,6 +1941,7 @@
 	int filter;
 	void *data;
 	short datatype;
+	Object *ob= OBACT;
 	
 	short no_name= 0;
 	float offset = CFRA - actcopy_firstframe;
@@ -2017,7 +2018,7 @@
 		
 		/* loop over curves, pasting keyframes */
 		for (ico= ipo_src->curve.first; ico; ico= ico->next) {
-			icu= verify_ipocurve((ID*)OBACT, ico->blocktype, actname, conname, "", ico->adrcode);
+			icu= verify_ipocurve((ID*)ob, ico->blocktype, actname, conname, "", ico->adrcode);
 			
 			if (icu) {
 				/* just start pasting, with the the first keyframe on the current frame, and so on */
@@ -2045,6 +2046,14 @@
 	/* free temp memory */
 	BLI_freelistN(&act_data);
 	
+	/* do depsgraph updates (for 3d-view)? */
+	if ((ob) && (G.saction->pin==0)) {
+		if (ob->type == OB_ARMATURE)
+			DAG_object_flush_update(G.scene, ob, OB_RECALC_OB|OB_RECALC_DATA);
+		else
+			DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
+	}
+	
 	/* undo and redraw stuff */
 	allqueue(REDRAWVIEW3D, 0);
 	allspace(REMAKEIPO, 0);





More information about the Bf-blender-cvs mailing list