diff options
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 85d597ccbdd..fccdcbef564 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6164,17 +6164,35 @@ static void direct_link_movieclip(FileData *fd, MovieClip *clip) } } +static void lib_link_movieTracks(FileData *fd, MovieClip *clip, ListBase *tracksbase) +{ + MovieTrackingTrack *track; + + for (track = tracksbase->first; track; track = track->next) { + track->gpd = newlibadr_us(fd, clip->id.lib, track->gpd); + } +} + static void lib_link_movieclip(FileData *fd, Main *main) { MovieClip *clip; for (clip = main->movieclip.first; clip; clip = clip->id.next) { if (clip->id.flag & LIB_NEEDLINK) { + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *object; + if (clip->adt) lib_link_animdata(fd, &clip->id, clip->adt); clip->gpd = newlibadr_us(fd, clip->id.lib, clip->gpd); + lib_link_movieTracks(fd, clip, &tracking->tracks); + + for (object = tracking->objects.first; object; object = object->next) { + lib_link_movieTracks(fd, clip, &object->tracks); + } + clip->id.flag -= LIB_NEEDLINK; } } |