diff --git a/app/node/input.cpp b/app/node/input.cpp index c6f8d4475..de31c0934 100644 --- a/app/node/input.cpp +++ b/app/node/input.cpp @@ -1075,7 +1075,9 @@ void NodeInput::CopyValues(NodeInput *source, NodeInput *dest, bool include_conn for (int i=0;ikeyframe_tracks_.size();i++) { dest->keyframe_tracks_[i].clear(); foreach (NodeKeyframePtr key, source->keyframe_tracks_.at(i)) { - dest->keyframe_tracks_[i].append(key->copy()); + NodeKeyframePtr key_copy = key->copy(); + key_copy->set_parent(dest); + dest->keyframe_tracks_[i].append(key_copy); } } diff --git a/app/node/input/media/media.cpp b/app/node/input/media/media.cpp index 8bfe11bb9..8d5acd4b8 100644 --- a/app/node/input/media/media.cpp +++ b/app/node/input/media/media.cpp @@ -40,14 +40,14 @@ QList MediaInput::Category() const return {kCategoryInput}; } -StreamPtr MediaInput::footage() +StreamPtr MediaInput::stream() { return footage_input_->get_standard_value().value(); } -void MediaInput::SetFootage(StreamPtr f) +void MediaInput::SetStream(StreamPtr s) { - footage_input_->set_standard_value(QVariant::fromValue(f)); + footage_input_->set_standard_value(QVariant::fromValue(s)); } bool MediaInput::IsMedia() const diff --git a/app/node/input/media/media.h b/app/node/input/media/media.h index 8934e321e..1ed9e0889 100644 --- a/app/node/input/media/media.h +++ b/app/node/input/media/media.h @@ -40,8 +40,8 @@ public: virtual QList Category() const override; - StreamPtr footage(); - void SetFootage(StreamPtr f); + StreamPtr stream(); + void SetStream(StreamPtr s); virtual bool IsMedia() const override; diff --git a/app/task/precache/precachetask.cpp b/app/task/precache/precachetask.cpp index 4829affb1..e707a6949 100644 --- a/app/task/precache/precachetask.cpp +++ b/app/task/precache/precachetask.cpp @@ -33,7 +33,7 @@ PreCacheTask::PreCacheTask(VideoStreamPtr footage, Sequence* sequence) : backend()->SetRenderMode(RenderMode::kOffline); video_node_ = new VideoInput(); - video_node_->SetFootage(footage); + video_node_->SetStream(footage); NodeParam::ConnectEdge(video_node_->output(), viewer()->texture_input()); diff --git a/app/widget/projectexplorer/projectexplorer.cpp b/app/widget/projectexplorer/projectexplorer.cpp index 9041e9f38..8a57628c9 100644 --- a/app/widget/projectexplorer/projectexplorer.cpp +++ b/app/widget/projectexplorer/projectexplorer.cpp @@ -554,7 +554,7 @@ QList ProjectExplorer::GetMediaNodesUsingFootage(Footage *item) if (n->IsMedia()) { MediaInput* media_node = static_cast(n); - if (media_node->footage()->footage() == item) { + if (media_node->stream()->footage() == item) { list.append(media_node); } } diff --git a/app/widget/projectexplorer/projectexplorerundo.cpp b/app/widget/projectexplorer/projectexplorerundo.cpp index 584d4a56c..609402caa 100644 --- a/app/widget/projectexplorer/projectexplorerundo.cpp +++ b/app/widget/projectexplorer/projectexplorerundo.cpp @@ -26,7 +26,7 @@ OfflineFootageCommand::OfflineFootageCommand(const QList &media, Q UndoCommand(parent) { foreach (MediaInput* i, media) { - stream_data_.insert(i, i->footage()); + stream_data_.insert(i, i->stream()); } project_ = static_cast(media.first()->parent())->project(); @@ -40,14 +40,14 @@ Project *OfflineFootageCommand::GetRelevantProject() const void OfflineFootageCommand::redo_internal() { for (auto it=stream_data_.cbegin(); it!=stream_data_.cend(); it++) { - it.key()->SetFootage(nullptr); + it.key()->SetStream(nullptr); } } void OfflineFootageCommand::undo_internal() { for (auto it=stream_data_.cbegin(); it!=stream_data_.cend(); it++) { - it.key()->SetFootage(it.value()); + it.key()->SetStream(it.value()); } } diff --git a/app/widget/timelinewidget/tool/import.cpp b/app/widget/timelinewidget/tool/import.cpp index f5ae5ec83..a2c77b7d4 100644 --- a/app/widget/timelinewidget/tool/import.cpp +++ b/app/widget/timelinewidget/tool/import.cpp @@ -417,7 +417,7 @@ void ImportTool::DropGhosts(bool insert) case Stream::kVideo: { VideoInput* video_input = new VideoInput(); - video_input->SetFootage(footage_stream); + video_input->SetStream(footage_stream); new NodeAddCommand(dst_graph, video_input, command); new NodeEdgeAddCommand(video_input->output(), clip->texture_input(), command); @@ -439,7 +439,7 @@ void ImportTool::DropGhosts(bool insert) case Stream::kAudio: { AudioInput* audio_input = new AudioInput(); - audio_input->SetFootage(footage_stream); + audio_input->SetStream(footage_stream); new NodeAddCommand(dst_graph, audio_input, command); VolumeNode* volume_node = new VolumeNode(); diff --git a/app/widget/viewer/footageviewer.cpp b/app/widget/viewer/footageviewer.cpp index 2ea2017b2..9cdccd1b9 100644 --- a/app/widget/viewer/footageviewer.cpp +++ b/app/widget/viewer/footageviewer.cpp @@ -57,8 +57,8 @@ void FootageViewerWidget::SetFootage(Footage *footage) ConnectViewerNode(nullptr); - video_node_->SetFootage(nullptr); - audio_node_->SetFootage(nullptr); + video_node_->SetStream(nullptr); + audio_node_->SetStream(nullptr); NodeParam::DisconnectEdge(video_node_->output(), sequence_.viewer_output()->texture_input()); NodeParam::DisconnectEdge(audio_node_->output(), sequence_.viewer_output()->samples_input()); @@ -97,12 +97,12 @@ void FootageViewerWidget::SetFootage(Footage *footage) } if (video_stream) { - video_node_->SetFootage(video_stream); + video_node_->SetStream(video_stream); NodeParam::ConnectEdge(video_node_->output(), sequence_.viewer_output()->texture_input()); } if (audio_stream) { - audio_node_->SetFootage(audio_stream); + audio_node_->SetStream(audio_stream); NodeParam::ConnectEdge(audio_node_->output(), sequence_.viewer_output()->samples_input()); }