diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-06-02 08:09:10 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-06-02 08:09:10 +0400 |
commit | aad39edee7dec4abed99967c2c2cd196f753cdf2 (patch) | |
tree | 4cf5beec1425873155db63af8de19e07cf75faa0 /source | |
parent | f579a66d7b731a61a1e45cb22b21373390b770ec (diff) |
== Action Editor - IKEY ==
Modified behaviour of IKEY in Action Editor a bit, so that the keyframes added have been updated to reflect the current state of an object/bone. Previously, it only used the current values of the ipo-curves they were being keyframed (maintained as fallback method now).
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/editaction.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index e9b0e43b410..1b0429abda2 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -2692,9 +2692,10 @@ void insertkey_action(void) { bAction *act; Key *key; + Object *ob= OBACT; IpoCurve *icu; short mode; - float cfra, val; + float cfra; /* get data */ act = G.saction->action; @@ -2713,8 +2714,10 @@ void insertkey_action(void) if (EDITABLE_ACHAN(achan)) { if (achan->ipo && (SEL_ACHAN(achan) || (mode == 1))) { for (icu= achan->ipo->curve.first; icu; icu=icu->next) { - val = icu->curval; - insert_vert_ipo(icu, cfra, val); + if (ob) + insertkey((ID *)ob, icu->blocktype, achan->name, NULL, icu->adrcode); + else + insert_vert_ipo(icu, cfra, icu->curval); } } @@ -2723,8 +2726,13 @@ void insertkey_action(void) if (EDITABLE_CONCHAN(conchan)) { if (conchan->ipo && (SEL_ACHAN(conchan) || (mode == 1))) { for (icu= conchan->ipo->curve.first; icu; icu=icu->next) { - val = icu->curval; - insert_vert_ipo(icu, cfra, val); + /* // commented out as this doesn't seem to work right for some reason + if (ob) + insertkey((ID *)ob, ID_CO, achan->name, conchan->name, CO_ENFORCE); + else + insert_vert_ipo(icu, cfra, icu->curval); + */ + insert_vert_ipo(icu, cfra, icu->curval); } } } @@ -2740,8 +2748,7 @@ void insertkey_action(void) if (key->ipo) { for (icu= key->ipo->curve.first; icu; icu=icu->next) { - val = icu->curval; - insert_vert_ipo(icu, cfra, val); + insert_vert_ipo(icu, cfra, icu->curval); } } } |