diff --git a/core/changelog.txt b/core/changelog.txt index 89354812f..0c4534c19 100644 --- a/core/changelog.txt +++ b/core/changelog.txt @@ -33,6 +33,7 @@ Please visit http://aegisub.net to download latest version - Renaming a style will now ask you if you want to rename all instances of it on the script. (AMZ) - Style name collisions (when moving from storage, creating or renaming) will now prompt the user before performing the action. (AMZ) - Added global hotkey for Video Play (default Ctrl+P). (AMZ) +- Added support to save and load keyframe list files. (AMZ) = 1.10 beta - 2006.08.07 =========================== diff --git a/core/frame_main.cpp b/core/frame_main.cpp index ceac13d64..c9b81c552 100644 --- a/core/frame_main.cpp +++ b/core/frame_main.cpp @@ -772,6 +772,7 @@ void FrameMain::SynchronizeProject(bool fromSubs) { subs->GetScriptInfo(_T("Video Zoom")).ToLong(&videoZoom); wxString curSubsVideo = DecodeRelativePath(subs->GetScriptInfo(_T("Video File")),AssFile::top->filename); wxString curSubsVFR = DecodeRelativePath(subs->GetScriptInfo(_T("VFR File")),AssFile::top->filename); + wxString curSubsKeyframes = DecodeRelativePath(subs->GetScriptInfo(_T("Keyframes File")),AssFile::top->filename); wxString curSubsAudio = DecodeRelativePath(subs->GetScriptInfo(_T("Audio File")),AssFile::top->filename); wxString AutoScriptString = subs->GetScriptInfo(_T("Automation Scripts")); @@ -808,7 +809,7 @@ void FrameMain::SynchronizeProject(bool fromSubs) { // Check if there is anything to change int autoLoadMode = Options.AsInt(_T("Autoload linked files")); bool hasToLoad = false; - if (curSubsAudio != audioBox->audioName || curSubsVFR != VFR_Output.GetFilename() || curSubsVideo != videoBox->videoDisplay->videoName) { + if (curSubsAudio != audioBox->audioName || curSubsVFR != VFR_Output.GetFilename() || curSubsVideo != videoBox->videoDisplay->videoName || curSubsKeyframes != videoBox->videoDisplay->GetKeyFramesName()) { hasToLoad = true; } @@ -838,6 +839,9 @@ void FrameMain::SynchronizeProject(bool fromSubs) { } } + // Keyframes + LoadKeyframes(curSubsKeyframes); + // Audio if (curSubsAudio != audioBox->audioName) { if (curSubsAudio == _T("?video")) LoadAudio(_T(""),true); @@ -873,6 +877,7 @@ void FrameMain::SynchronizeProject(bool fromSubs) { subs->SetScriptInfo(_T("Video Zoom"),zoom); subs->SetScriptInfo(_T("Video Position"),seekpos); subs->SetScriptInfo(_T("VFR File"),MakeRelativePath(VFR_Output.GetFilename(),AssFile::top->filename)); + subs->SetScriptInfo(_T("Keyframes File"),MakeRelativePath(videoBox->videoDisplay->GetKeyFramesName(),AssFile::top->filename)); // Create list of Automation scripts wxString scripts; @@ -1031,6 +1036,7 @@ void FrameMain::LoadKeyframes(wxString filename) { // Set keyframes videoBox->videoDisplay->SetOverKeyFrames(keyFrames); + videoBox->videoDisplay->SetKeyFramesName(filename); // Set FPS if (!videoBox->videoDisplay->loaded) { diff --git a/core/video_display.h b/core/video_display.h index 157ac3612..36135584c 100644 --- a/core/video_display.h +++ b/core/video_display.h @@ -75,6 +75,7 @@ private: bool overKeyFramesLoaded; wxArrayInt KeyFrames; wxArrayInt overKeyFrames; + wxString keyFramesFilename; clock_t PlayTime; clock_t StartTime; @@ -108,6 +109,8 @@ public: void CloseOverKeyFrames(); bool OverKeyFramesLoaded(); bool KeyFramesLoaded(); + wxString GetKeyFramesName() { return keyFramesFilename; } + void SetKeyFramesName(wxString name) { keyFramesFilename = name; } VideoProvider *provider;