diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-12-13 09:31:49 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-12-13 09:31:49 +0300 |
commit | 1474b32456f26ead36b50d787d99f9b1769b27e8 (patch) | |
tree | a3726096ee36713a817df8492c97bda6ba4899d2 /source/blender/blenkernel/intern/lattice.c | |
parent | dec478957114ddaed1512a47a590ff7fa52ade70 (diff) |
Lattices now have AnimData
This allows manual (point by point) animation of their control verts,
although many other settings cannot really be animated with any
visible effects yet. Interestingly, lattices also had IPO block
pointers, though they were never really used (AFAIK).
Todo:
- Animation Editor support has yet to be added. I've got a few other
things to add to, so will group those changes together.
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r-- | source/blender/blenkernel/intern/lattice.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 73d77e850fd..891d42c4a76 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -49,6 +49,7 @@ #include "DNA_curve_types.h" #include "DNA_key_types.h" +#include "BKE_animsys.h" #include "BKE_anim.h" #include "BKE_cdderivedmesh.h" #include "BKE_displist.h" @@ -203,10 +204,6 @@ Lattice *copy_lattice(Lattice *lt) ltn= copy_libblock(lt); ltn->def= MEM_dupallocN(lt->def); - -#if 0 // XXX old animation system - id_us_plus((ID *)ltn->ipo); -#endif // XXX old animation system ltn->key= copy_key(ltn->key); if(ltn->key) ltn->key->from= (ID *)ltn; @@ -233,6 +230,12 @@ void free_lattice(Lattice *lt) MEM_freeN(editlt); MEM_freeN(lt->editlatt); } + + /* free animation data */ + if (lt->adt) { + BKE_free_animdata(<->id); + lt->adt= NULL; + } } |