various: moved time from viewer UI to viewer node

This commit is contained in:
itsmattkc
2022-10-23 20:56:04 -07:00
parent fc56058e8a
commit d1545745d8
47 changed files with 259 additions and 418 deletions
+3 -3
View File
@@ -74,7 +74,7 @@ void MulticamWidget::SetMulticamNodeInternal(ViewerOutput *viewer, MultiCamNode
void MulticamWidget::SetMulticamNode(ViewerOutput *viewer, MultiCamNode *n, ClipBlock *clip, const rational &time)
{
if (time.isNaN() || time == GetTime()) {
if (time.isNaN() || !GetConnectedNode() || time == GetConnectedNode()->GetPlayhead()) {
SetMulticamNodeInternal(viewer, n, clip);
play_queue_.clear();
} else {
@@ -125,13 +125,13 @@ void MulticamWidget::Switch(int source, bool split_clip)
BlockSplitPreservingLinksCommand *split = nullptr;
if (clip_ && split_clip && clip_->in() < GetTime() && clip_->out() > GetTime()) {
if (clip_ && split_clip && clip_->in() < GetConnectedNode()->GetPlayhead() && clip_->out() > GetConnectedNode()->GetPlayhead()) {
QVector<Block*> blocks;
blocks.append(clip_);
blocks.append(clip_->block_links());
split = new BlockSplitPreservingLinksCommand(blocks, {GetTime()});
split = new BlockSplitPreservingLinksCommand(blocks, {GetConnectedNode()->GetPlayhead()});
split->redo_now();
command->add_child(split);