[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13696] trunk/blender/source/blender/src/ editaction.c: Bugfix: Action Editor Insert-Key

Joshua Leung aligorith at gmail.com
Fri Feb 15 06:20:29 CET 2008


Revision: 13696
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13696
Author:   aligorith
Date:     2008-02-15 06:20:28 +0100 (Fri, 15 Feb 2008)

Log Message:
-----------
Bugfix: Action Editor Insert-Key

When inserting a keyframe using the IKEY in the Action Editor, Blender could crash if inserting a keyframe in a Constraint Channel.

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-02-15 04:58:55 UTC (rev 13695)
+++ trunk/blender/source/blender/src/editaction.c	2008-02-15 05:20:28 UTC (rev 13696)
@@ -1381,8 +1381,8 @@
 		
 		/* filter data */
 		filter= (ACTFILTER_VISIBLE | ACTFILTER_FOREDIT | ACTFILTER_ONLYICU );
-		if (mode == 2) filter |= ACTFILTER_SEL;
-		if (mode == 3) filter |= ACTFILTER_ACTGROUPED;
+		if (mode == 2) 			filter |= ACTFILTER_SEL;
+		else if (mode == 3) 	filter |= ACTFILTER_ACTGROUPED;
 		
 		actdata_filter(&act_data, filter, data, datatype);
 		
@@ -1391,10 +1391,11 @@
 			/* verify that this is indeed an ipo curve */
 			if (ale->key_data && ale->owner) {
 				bActionChannel *achan= (bActionChannel *)ale->owner;
+				bConstraintChannel *conchan= (ale->type==ACTTYPE_CONCHAN) ? ale->data : NULL;
 				IpoCurve *icu= (IpoCurve *)ale->key_data;
 				
 				if (ob)
-					insertkey((ID *)ob, icu->blocktype, achan->name, NULL, icu->adrcode, 0);
+					insertkey((ID *)ob, icu->blocktype, achan->name, ((conchan)?(conchan->name):(NULL)), icu->adrcode, 0);
 				else
 					insert_vert_icu(icu, cfra, icu->curval, 0);
 			}





More information about the Bf-blender-cvs mailing list