diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-04-30 20:19:20 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-04-30 20:19:20 +0400 |
commit | f111131ca68359e928056eff09a03d0eee8c681a (patch) | |
tree | 866483646a4fca238c0d1f4e22ff1bcb1ed0d6d2 /source/blender/blenloader | |
parent | 323aedb81e8f606cfb1357053891e989ff393099 (diff) |
Camera tracking: initial commit of dopesheet view for clip editor
- Displays dopesheet information for selected tracks, and currently does not
support any kind of editing.
- Changed regions to use the whole main region for such views as curves and dopesheet.
This allows to have own panels with tools/properties in this area.
- Active clip is getting synchronized between different clip editor editors in the
same screen, so updating of curve/dopesheet views happens automatically when one
changes current clip in one of this editors.
- Panels in toolbox and properties panels are now separated to rely on current view
mode, but some operators and poll functions still need to be updated.
- Added new screen called "Movie Tracking" where layout is configured to
display timeline, main clip window, curves and dopesheet.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 50 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 14 |
2 files changed, 64 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 981930119c3..d4d2918f686 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6168,6 +6168,20 @@ 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 = channel->next; + } +} + static void direct_link_movieclip(FileData *fd, MovieClip *clip) { MovieTracking *tracking= &clip->tracking; @@ -6203,6 +6217,8 @@ 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) @@ -13284,6 +13300,40 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 2)) { + bScreen *sc; + + for (sc = main->screen.first; sc; sc = sc->id.next) { + ScrArea *sa; + for (sa = sc->areabase.first; sa; sa = sa->next) { + SpaceLink *sl; + + for (sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_CLIP) { + SpaceClip *sclip = (SpaceClip *)sl; + ARegion *ar; + int hide = FALSE; + + for (ar = sa->regionbase.first; ar; ar = ar->next) { + if (ar->regiontype == RGN_TYPE_PREVIEW) { + if (ar->alignment != RGN_ALIGN_NONE) { + ar->flag |= RGN_FLAG_HIDDEN; + ar->v2d.flag &= ~V2D_IS_INITIALISED; + ar->alignment = RGN_ALIGN_NONE; + + hide = TRUE; + } + } + } + + if (hide) { + sclip->view = SC_VIEW_CLIP; + } + } + } + } + } + } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 43f35462c7b..5580c9efc9b 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2677,6 +2677,18 @@ 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); + + channel = channel->next; + } +} + static void write_movieReconstruction(WriteData *wd, MovieTrackingReconstruction *reconstruction) { if (reconstruction->camnr) @@ -2709,6 +2721,8 @@ static void write_movieclips(WriteData *wd, ListBase *idbase) object= object->next; } + + write_movieDopesheet(wd, &tracking->dopesheet); } clip= clip->id.next; |