Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-02-15 08:20:28 +0300
committerJoshua Leung <aligorith@gmail.com>2008-02-15 08:20:28 +0300
commit8c8d585079e1888257c285ccfc4a4bf6e9a41f46 (patch)
treeffd25425b6a68bdd13560d98f2049c1a37d70413 /source/blender/src/editaction.c
parent4e4c74298357b5c9bc6323046644b15baba30168 (diff)
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.
Diffstat (limited to 'source/blender/src/editaction.c')
-rw-r--r--source/blender/src/editaction.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index 0737a285ef3..2732e2365d5 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -1381,8 +1381,8 @@ void insertkey_action(void)
/* 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 @@ void insertkey_action(void)
/* 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);
}