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:
authorTon Roosendaal <ton@blender.org>2005-10-10 21:42:48 +0400
committerTon Roosendaal <ton@blender.org>2005-10-10 21:42:48 +0400
commit87365d8d407d5cfddcfa48f1dc3902f7f1a3fa5b (patch)
treea43ae94a544511409f44b9d08e828a6eedfcf123 /source/blender/src/transform_conversions.c
parentad915277a0d7be10889cf8d00ce392b4800ca0d5 (diff)
Stage two of the giant animation recode project; Ipo/Action/NLA cleanup
-> Note; added 2 new c files (split editipo.c). MSVC needs upgrade. Impatient people can check the goodies in CMS: http://www.blender3d.org/cms/Action_and_NLA_editor.706.0.html Most work was on trying to unwind the spaghetti for editing ipos. Too much history and bad design got added here. Most evident changes: - made generic 'context' for detecting which Ipo is being edited, or to assign ipos or to retrieve ipo curves. - made generic insertkey() for all ipo types, including actions - shuffled a lot of code around to make things more logical. Also made sure local functions are not exported It is far from ready... when action/nla was added in Blender, a lot of duplicate code was generated. That's for another time. Now the goodies; - made Actions to allow any Ipo type - made NLA to define active actions, for Action window too - corrected timing for active action, so it shows the 'real time', as defined in NLA editor. I did update python code, but that would require testing. Testing is needed for this commit in general, too many changes happened on all levels of the animation system. :) Will keep track of all reports this evening, hopefully it doesnt break the pre-release schedule!
Diffstat (limited to 'source/blender/src/transform_conversions.c')
-rwxr-xr-xsource/blender/src/transform_conversions.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c
index fbbea6a76fd..bb6543267ab 100755
--- a/source/blender/src/transform_conversions.c
+++ b/source/blender/src/transform_conversions.c
@@ -1627,24 +1627,24 @@ void special_aftertrans_update(TransInfo *t)
pose= ob->pose;
if (!act)
- act= ob->action= add_empty_action();
+ act= ob->action= add_empty_action(ID_PO);
set_pose_keys(ob); // sets chan->flag to POSE_KEY if bone selected
for (pchan=pose->chanbase.first; pchan; pchan=pchan->next){
if (pchan->flag & POSE_KEY){
- set_action_key(act, pchan, AC_QUAT_X, 1);
- set_action_key(act, pchan, AC_QUAT_Y, 1);
- set_action_key(act, pchan, AC_QUAT_Z, 1);
- set_action_key(act, pchan, AC_QUAT_W, 1);
-
- set_action_key(act, pchan, AC_SIZE_X, 1);
- set_action_key(act, pchan, AC_SIZE_Y, 1);
- set_action_key(act, pchan, AC_SIZE_Z, 1);
-
- set_action_key(act, pchan, AC_LOC_X, 1);
- set_action_key(act, pchan, AC_LOC_Y, 1);
- set_action_key(act, pchan, AC_LOC_Z, 1);
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_SIZE_X);
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_SIZE_Y);
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_SIZE_Z);
+
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_QUAT_W);
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_QUAT_X);
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_QUAT_Y);
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_QUAT_Z);
+
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_LOC_X);
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_LOC_Y);
+ insertkey(&act->id, ID_AC, pchan->name, NULL, AC_LOC_Z);
}
}
@@ -1679,18 +1679,18 @@ void special_aftertrans_update(TransInfo *t)
/* Set autokey if necessary */
if ((G.flags & G_RECORDKEYS) && (!cancelled) && (base->flag & SELECT)){
+ /* note, here we have to do context still */
+ insertkey(&base->object->id, ID_OB, NULL, NULL, OB_ROT_X);
+ insertkey(&base->object->id, ID_OB, NULL, NULL, OB_ROT_Y);
+ insertkey(&base->object->id, ID_OB, NULL, NULL, OB_ROT_Z);
- insertkey(&base->object->id, OB_ROT_X);
- insertkey(&base->object->id, OB_ROT_Y);
- insertkey(&base->object->id, OB_ROT_Z);
-
- insertkey(&base->object->id, OB_LOC_X);
- insertkey(&base->object->id, OB_LOC_Y);
- insertkey(&base->object->id, OB_LOC_Z);
+ insertkey(&base->object->id, ID_OB, NULL, NULL, OB_LOC_X);
+ insertkey(&base->object->id, ID_OB, NULL, NULL, OB_LOC_Y);
+ insertkey(&base->object->id, ID_OB, NULL, NULL, OB_LOC_Z);
- insertkey(&base->object->id, OB_SIZE_X);
- insertkey(&base->object->id, OB_SIZE_Y);
- insertkey(&base->object->id, OB_SIZE_Z);
+ insertkey(&base->object->id, ID_OB, NULL, NULL, OB_SIZE_X);
+ insertkey(&base->object->id, ID_OB, NULL, NULL, OB_SIZE_Y);
+ insertkey(&base->object->id, ID_OB, NULL, NULL, OB_SIZE_Z);
remake_object_ipos (ob);
allqueue(REDRAWIPO, 0);