diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-15 20:06:48 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-15 20:06:48 +0400 |
commit | bd249c3bffed10a7634ed83fcd5cd07729182689 (patch) | |
tree | ea39b404674dd2c7973c4d0360ac65ccf161c8e2 /source/blender/blenkernel/intern | |
parent | 7985ae700cdf01ff2d59b0100538a4dff55d5b85 (diff) |
Camera tracking: animation datablock for MovieClip
Added AnimData block to MovieClip datablock which allows to animate different
properties in clip. Currently supports animation of stabilization influence only.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index b32421a6b3d..9ae3ad95d5c 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -88,6 +88,7 @@ short id_type_can_have_animdata (ID *id) case ID_LA: case ID_CA: case ID_WO: case ID_SPK: case ID_SCE: + case ID_MC: { return 1; } @@ -2335,6 +2336,9 @@ void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime) /* speakers */ EVAL_ANIM_IDS(main->speaker.first, ADT_RECALC_ANIM); + /* movie clips */ + EVAL_ANIM_IDS(main->movieclip.first, ADT_RECALC_ANIM); + /* objects */ /* ADT_RECALC_ANIM doesn't need to be supplied here, since object AnimData gets * this tagged by Depsgraph on framechange. This optimisation means that objects diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c90faa7e0ca..03fe18e4bd8 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -64,6 +64,7 @@ #include "BLI_mempool.h" #include "BLI_threads.h" +#include "BKE_animsys.h" #include "BKE_constraint.h" #include "BKE_library.h" #include "BKE_global.h" @@ -889,6 +890,8 @@ static void free_buffers(MovieClip *clip) IMB_free_anim(clip->anim); clip->anim= FALSE; } + + BKE_free_animdata((ID *) clip); } void BKE_movieclip_reload(MovieClip *clip) |