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-05-04 03:15:01 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-05-04 03:15:01 +0400
commit48ead2736643cf0327b9472cfd05042a58f9d9b0 (patch)
treed966adce993fd14472a4ff2a79372da305273fc7 /source/blender/blenloader
parent5da2135eef39ac042a8c4babcac7be375e6903d2 (diff)
Camera tracking: switch dopesheet information to lazy calculation
All operators which changes tracking data now just tags dopsheet as outdated, actual re-calculaiton of happens only when this information is actually needed (like on dopesheet draw). This makes things a bit faster when there's no dopesheet visible in current screen and also makes it much easier to update dopesheet using dependency graph. Also renamed dopesheet_sort_order to dopesheet_sort_method in rna and internal stuff which makes much more sense and also correlated with naming in file browser.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c20
-rw-r--r--source/blender/blenloader/intern/writefile.c15
2 files changed, 3 insertions, 32 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index afc4989f620..df71a9f6494 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6170,21 +6170,6 @@ static void direct_link_movieTracks(FileData *fd, ListBase *tracksbase)
}
}
-static void direct_link_movieDopesheet(FileData *fd, MovieTrackingDopesheet *dopesheet)
-{
- MovieTrackingDopesheetChannel *channel;
-
- link_list(fd, &dopesheet->channels);
-
- channel = dopesheet->channels.first;
- while (channel) {
- channel->track = newdataadr(fd, channel->track);
- channel->segments = newdataadr(fd, channel->segments);
-
- channel = channel->next;
- }
-}
-
static void direct_link_movieclip(FileData *fd, MovieClip *clip)
{
MovieTracking *tracking= &clip->tracking;
@@ -6211,6 +6196,9 @@ static void direct_link_movieclip(FileData *fd, MovieClip *clip)
clip->tracking.stabilization.scaleibuf= NULL;
clip->tracking.stabilization.rot_track= newdataadr(fd, clip->tracking.stabilization.rot_track);
+ clip->tracking.dopesheet.ok = 0;
+ clip->tracking.dopesheet.channels.first = clip->tracking.dopesheet.channels.last = NULL;
+
link_list(fd, &tracking->objects);
object= tracking->objects.first;
@@ -6220,8 +6208,6 @@ static void direct_link_movieclip(FileData *fd, MovieClip *clip)
object= object->next;
}
-
- direct_link_movieDopesheet(fd, &clip->tracking.dopesheet);
}
static void lib_link_movieclip(FileData *fd, Main *main)
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 2199259a322..14c8d42654c 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2679,19 +2679,6 @@ static void write_movieTracks(WriteData *wd, ListBase *tracks)
}
}
-static void write_movieDopesheet(WriteData *wd, MovieTrackingDopesheet *dopesheet)
-{
- MovieTrackingDopesheetChannel *channel;
-
- channel = dopesheet->channels.first;
- while (channel) {
- writestruct(wd, DATA, "MovieTrackingDopesheetChannel", 1, channel);
- writedata(wd, DATA, 2 * channel->tot_segment * sizeof(int), channel->segments);
-
- channel = channel->next;
- }
-}
-
static void write_movieReconstruction(WriteData *wd, MovieTrackingReconstruction *reconstruction)
{
if (reconstruction->camnr)
@@ -2724,8 +2711,6 @@ static void write_movieclips(WriteData *wd, ListBase *idbase)
object= object->next;
}
-
- write_movieDopesheet(wd, &tracking->dopesheet);
}
clip= clip->id.next;