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:
authorJoshua Leung <aligorith@gmail.com>2009-08-03 17:09:23 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-03 17:09:23 +0400
commit641c8e69a82fc8f674f81948e329cae334ef60fc (patch)
tree9e67c1672c83d49a728f28da3a7ca48dd5f6d558 /source/blender/blenkernel/intern
parentcd905eef702555b27d4d90983b079a1a62c31fb8 (diff)
2.5 - MetaBalls are now animateable
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c5
-rw-r--r--source/blender/blenkernel/intern/mball.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 7278fee5ab8..560ae76e4d1 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -71,7 +71,7 @@ static short id_has_animdata (ID *id)
switch (GS(id->name)) {
/* has AnimData */
case ID_OB:
- case ID_CU:
+ case ID_MB: case ID_CU:
case ID_KE:
case ID_PA:
case ID_MA: case ID_TE: case ID_NT:
@@ -1442,6 +1442,9 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime)
// TODO: we probably need the same hack as for curves (ctime-hack)
EVAL_ANIM_IDS(main->key.first, ADT_RECALC_ANIM);
+ /* metaballs */
+ EVAL_ANIM_IDS(main->mball.first, ADT_RECALC_ANIM);
+
/* curves */
/* we need to perform a special hack here to ensure that the ctime
* value of the curve gets set in case there's no animation for that
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 74d56e81a87..c7058d7d8db 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -55,6 +55,7 @@
#include "BKE_main.h"
/* #include "BKE_object.h" */
+#include "BKE_animsys.h"
#include "BKE_scene.h"
#include "BKE_blender.h"
#include "BKE_library.h"
@@ -90,6 +91,7 @@ void free_mball(MetaBall *mb)
{
unlink_mball(mb);
+ if(mb->adt) BKE_free_animdata((ID *)mb);
if(mb->mat) MEM_freeN(mb->mat);
if(mb->bb) MEM_freeN(mb->bb);
BLI_freelistN(&mb->elems);