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

@@ -377,6 +377,28 @@ struct gla2DDrawInfo {
float wo_to_sc[2];
};
void gla2DGetMap(gla2DDrawInfo *di, rctf *rect)
{
*rect= di->world_rect;
}
void gla2DSetMap(gla2DDrawInfo *di, rctf *rect)
{
int sc_w, sc_h;
float wo_w, wo_h;
di->world_rect= *rect;
sc_w= (di->screen_rect.xmax-di->screen_rect.xmin);
sc_h= (di->screen_rect.ymax-di->screen_rect.ymin);
wo_w= (di->world_rect.xmax-di->world_rect.xmin);
wo_h= (di->world_rect.ymax-di->world_rect.ymin);
di->wo_to_sc[0]= sc_w/wo_w;
di->wo_to_sc[1]= sc_h/wo_h;
}
gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect)
{
gla2DDrawInfo *di= MEM_mallocN(sizeof(*di), "gla2DDrawInfo");