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!
This commit is contained in:
2005-10-10 17:42:48 +00:00
parent ad915277a0
commit 87365d8d40
26 changed files with 4045 additions and 3963 deletions

View File

@@ -70,6 +70,7 @@
#include "BDR_editobject.h"
#include "BSE_edit.h"
#include "BSE_editipo.h"
#include "mydevice.h"
#include "blendef.h"
@@ -493,7 +494,6 @@ void paste_posebuf (int flip)
Object *ob= OBACT;
bPoseChannel *chan, *pchan;
float eul[4];
int newchan = 0;
char name[32];
if (!ob || !ob->pose)
@@ -533,22 +533,23 @@ void paste_posebuf (int flip)
}
if (G.flags & G_RECORDKEYS){
ID *id= &ob->id;
/* Set keys on pose */
if (chan->flag & POSE_ROT){
set_action_key(ob->action, pchan, AC_QUAT_X, newchan);
set_action_key(ob->action, pchan, AC_QUAT_Y, newchan);
set_action_key(ob->action, pchan, AC_QUAT_Z, newchan);
set_action_key(ob->action, pchan, AC_QUAT_W, newchan);
insertkey(id, ID_AC, chan->name, NULL, AC_QUAT_X);
insertkey(id, ID_AC, chan->name, NULL, AC_QUAT_Y);
insertkey(id, ID_AC, chan->name, NULL, AC_QUAT_Z);
insertkey(id, ID_AC, chan->name, NULL, AC_QUAT_W);
}
if (chan->flag & POSE_SIZE){
set_action_key(ob->action, pchan, AC_SIZE_X, newchan);
set_action_key(ob->action, pchan, AC_SIZE_Y, newchan);
set_action_key(ob->action, pchan, AC_SIZE_Z, newchan);
insertkey(id, ID_AC, chan->name, NULL, AC_SIZE_X);
insertkey(id, ID_AC, chan->name, NULL, AC_SIZE_Y);
insertkey(id, ID_AC, chan->name, NULL, AC_SIZE_Z);
}
if (chan->flag & POSE_LOC){
set_action_key(ob->action, pchan, AC_LOC_X, newchan);
set_action_key(ob->action, pchan, AC_LOC_Y, newchan);
set_action_key(ob->action, pchan, AC_LOC_Z, newchan);
insertkey(id, ID_AC, pchan->name, NULL, AC_LOC_X);
insertkey(id, ID_AC, pchan->name, NULL, AC_LOC_Y);
insertkey(id, ID_AC, pchan->name, NULL, AC_LOC_Z);
}
}
}