start implementing serializers

This commit is contained in:
itsmattkc
2022-01-12 08:48:31 -08:00
parent d8ccc62d51
commit 4ecce20c35
38 changed files with 2984 additions and 1329 deletions
+11 -3
View File
@@ -51,6 +51,7 @@
#include "dialog/preferences/preferences.h"
#include "node/color/colormanager/colormanager.h"
#include "node/factory.h"
#include "node/project/serializer/serializer.h"
#include "panel/panelmanager.h"
#include "panel/project/project.h"
#include "panel/viewer/viewer.h"
@@ -151,6 +152,9 @@ void Core::Start()
// Initialize ConformManager
ConformManager::CreateInstance();
// Initialize project serializers
ProjectSerializer::Initialize();
//
// Start application
//
@@ -206,6 +210,8 @@ void Core::Stop()
}
}
ProjectSerializer::Destroy();
ConformManager::DestroyInstance();
FrameManager::DestroyInstance();
@@ -491,11 +497,10 @@ bool Core::AddOpenProjectFromTask(Task *task)
if (!load_task->IsCancelled()) {
Project* project = load_task->GetLoadedProject();
MainWindowLayoutInfo layout = load_task->GetLoadedLayout();
if (ValidateFootageInLoadedProject(project, load_task->GetFilenameProjectWasSavedAs())) {
if (ValidateFootageInLoadedProject(project, project->GetSavedURL())) {
AddOpenProject(project);
main_window_->LoadLayout(layout);
main_window_->LoadLayout(project->GetLayoutInfo());
return true;
} else {
@@ -754,6 +759,9 @@ void Core::SaveProjectInternal(Project* project, const QString& override_filenam
// Create save manager
Task* psm;
// Put layout into project
project->SetLayoutInfo(main_window_->SaveLayout());
if (project->filename().endsWith(QStringLiteral(".otio"), Qt::CaseInsensitive)) {
#ifdef USE_OTIO
psm = new SaveOTIOTask(project);