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:
@@ -42,7 +42,7 @@ Sequence::Sequence()
|
||||
AddNode(viewer_output_);
|
||||
}
|
||||
|
||||
void Sequence::Load(QXmlStreamReader *reader)
|
||||
void Sequence::Load(QXmlStreamReader *reader, QHash<quintptr, StreamPtr> &footage_ptrs, QList<NodeInput::FootageConnection>& footage_connections)
|
||||
{
|
||||
XMLAttributeLoop(reader, attr) {
|
||||
if (attr.name() == "name") {
|
||||
@@ -125,7 +125,7 @@ void Sequence::Load(QXmlStreamReader *reader)
|
||||
}
|
||||
|
||||
if (node) {
|
||||
node->Load(reader, output_ptrs, desired_connections, reader->name().toString());
|
||||
node->Load(reader, output_ptrs, desired_connections, footage_connections, reader->name().toString());
|
||||
|
||||
AddNode(node);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "node/graph.h"
|
||||
#include "node/output/viewer/viewer.h"
|
||||
#include "render/videoparams.h"
|
||||
#include "project/item/footage/stream.h"
|
||||
#include "project/item/item.h"
|
||||
|
||||
class Sequence;
|
||||
@@ -41,7 +42,7 @@ public:
|
||||
/**
|
||||
* @brief Load function
|
||||
*/
|
||||
virtual void Load(QXmlStreamReader* reader) override;
|
||||
virtual void Load(QXmlStreamReader* reader, QHash<quintptr, StreamPtr> &footage_ptrs, QList<NodeParam::FootageConnection> &footage_connections) override;
|
||||
|
||||
/**
|
||||
* @brief Save function
|
||||
|
||||
Reference in New Issue
Block a user