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:
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r--source/blender/blenkernel/intern/lattice.c11
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(&lt->id);
+ lt->adt= NULL;
+ }
}