timeline/various: implemented block copy/paste
Implemented the ability to copy/paste blocks/clips in the timeline. This did require some large scale changes and reworking of the copy/paste system introduced a few commits ago, but should be largely functional now.
This commit is contained in:
+6
-4
@@ -50,7 +50,7 @@ Node::~Node()
|
||||
}
|
||||
}
|
||||
|
||||
void Node::Load(QXmlStreamReader *reader, QHash<quintptr, NodeOutput *> &output_ptrs, QList<NodeInput::SerializedConnection>& input_connections, QList<NodeParam::FootageConnection>& footage_connections, const QAtomicInt* cancelled)
|
||||
void Node::Load(QXmlStreamReader *reader, XMLNodeData& xml_node_data, const QAtomicInt* cancelled)
|
||||
{
|
||||
while (XMLReadNextStartElement(reader)) {
|
||||
if (cancelled && *cancelled) {
|
||||
@@ -80,7 +80,7 @@ void Node::Load(QXmlStreamReader *reader, QHash<quintptr, NodeOutput *> &output_
|
||||
continue;
|
||||
}
|
||||
|
||||
param->Load(reader, output_ptrs, input_connections, footage_connections, cancelled);
|
||||
param->Load(reader, xml_node_data, cancelled);
|
||||
} else {
|
||||
reader->skipCurrentElement();
|
||||
}
|
||||
@@ -89,9 +89,11 @@ void Node::Load(QXmlStreamReader *reader, QHash<quintptr, NodeOutput *> &output_
|
||||
|
||||
void Node::Save(QXmlStreamWriter *writer, const QString &custom_name) const
|
||||
{
|
||||
writer->writeStartElement(custom_name.isEmpty() ? "node" : custom_name);
|
||||
writer->writeStartElement(custom_name.isEmpty() ? QStringLiteral("node") : custom_name);
|
||||
|
||||
writer->writeAttribute("id", id());
|
||||
writer->writeAttribute(QStringLiteral("id"), id());
|
||||
|
||||
writer->writeAttribute(QStringLiteral("ptr"), QString::number(reinterpret_cast<quintptr>(this)));
|
||||
|
||||
foreach (NodeParam* param, parameters()) {
|
||||
param->Save(writer);
|
||||
|
||||
Reference in New Issue
Block a user