implemented footage loading from projects
Footage is a special case where the node parameters can reference objects that exist outside of the graph. Therefore specific code is needed to serialize/deserialize.
This commit is contained in:
@@ -44,7 +44,7 @@ QIcon Folder::icon()
|
||||
return icon::Folder;
|
||||
}
|
||||
|
||||
void Folder::Load(QXmlStreamReader *reader)
|
||||
void Folder::Load(QXmlStreamReader *reader, QHash<quintptr, StreamPtr> &footage_ptrs, QList<NodeParam::FootageConnection>& footage_connections)
|
||||
{
|
||||
XMLAttributeLoop(reader, attr) {
|
||||
if (attr.name() == "name") {
|
||||
@@ -67,7 +67,7 @@ void Folder::Load(QXmlStreamReader *reader)
|
||||
}
|
||||
|
||||
add_child(child);
|
||||
child->Load(reader);
|
||||
child->Load(reader, footage_ptrs, footage_connections);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#ifndef FOLDER_H
|
||||
#define FOLDER_H
|
||||
|
||||
#include "node/param.h"
|
||||
#include "project/item/footage/footage.h"
|
||||
#include "project/item/item.h"
|
||||
|
||||
/**
|
||||
@@ -40,7 +42,7 @@ public:
|
||||
|
||||
virtual QIcon icon() override;
|
||||
|
||||
virtual void Load(QXmlStreamReader* reader) override;
|
||||
virtual void Load(QXmlStreamReader* reader, QHash<quintptr, StreamPtr> &footage_ptrs, QList<NodeParam::FootageConnection> &footage_connections) override;
|
||||
|
||||
virtual void Save(QXmlStreamWriter* writer) const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user