Camera tracking: animation datablock for MovieClip
[blender-staging.git] / source / blender / blenloader / intern / readfile.c
index cff4f3965fa34bf8760a7fdcab16e971f3e67f8e..377c438f874c8dae5074e01660634c710868ecb0 100644 (file)
@@ -6051,6 +6051,8 @@ static void direct_link_movieclip(FileData *fd, MovieClip *clip)
        MovieTracking *tracking= &clip->tracking;
        MovieTrackingObject *object;
 
+       clip->adt= newdataadr(fd, clip->adt);
+
        if(fd->movieclipmap) clip->cache= newmclipadr(fd, clip->cache);
        else clip->cache= NULL;
 
@@ -6088,6 +6090,9 @@ static void lib_link_movieclip(FileData *fd, Main *main)
        clip= main->movieclip.first;
        while(clip) {
                if(clip->id.flag & LIB_NEEDLINK) {
+                       if (clip->adt)
+                               lib_link_animdata(fd, &clip->id, clip->adt);
+
                        clip->gpd= newlibadr_us(fd, clip->id.lib, clip->gpd);
 
                        clip->id.flag -= LIB_NEEDLINK;