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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-10 19:26:50 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-10 19:26:50 +0400
commit39e591d3d04015b84fe5f12e7ef5af6507df92af (patch)
tree9e529ea6658e526a56e108866aab9578209b6de8 /source/blender/blenloader
parent5534701e5d7659d8fdd73ef64375116bb07463e8 (diff)
Support for per-track Grease Pencil datablocks for motion tracking
Originally was needed to reach easy way of defining masks used for tracking (do eliminate textures which doesn't belong to feature when tracking. Implemented as alternative to GP datablock for clip and added switch between per-clip and per-track GP datablocks -- internal limitations of GP doesn't allow to display all GP datablocks easily. So either you see.edit GP associated with clip or with track. GP strokes associated with track are relative to track's position, following tracks during tracking and could be shared between several tracks. Masking code presents in libmv and there's rasterizer of GP datablocks for masks in blender's tracking module, but they still need to be glued together. Some documentation cound be found at this page: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker#Grease_Pencil
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c18
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;
}
}