various: moved time from viewer UI to viewer node
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user