[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [10857] trunk/blender/source/blender/src/ editaction.c: == Action Editor - IKEY ==
Joshua Leung
aligorith at gmail.com
Sat Jun 2 06:09:11 CEST 2007
Revision: 10857
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10857
Author: aligorith
Date: 2007-06-02 06:09:10 +0200 (Sat, 02 Jun 2007)
Log Message:
-----------
== 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).
Modified Paths:
--------------
trunk/blender/source/blender/src/editaction.c
Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c 2007-06-02 02:02:33 UTC (rev 10856)
+++ trunk/blender/source/blender/src/editaction.c 2007-06-02 04:09:10 UTC (rev 10857)
@@ -2692,9 +2692,10 @@
{
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 @@
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 @@
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 @@
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);
}
}
}
More information about the Bf-blender-cvs
mailing list