implemented new block system

Fixes recurring design issue that the Blocks were a frequent exception to the
DAG concept. The Blocks connecting to each others inputs/outputs while not
necessarily being "dependent" on each other to produce an image continually
causes issues while trying to create a rendering code path. This redesign
should provide a more "directed" approach to the directed acyclic graph.
This commit is contained in:
itsmattkc
2019-12-02 00:37:03 +11:00
parent 6314c80cbc
commit 79ee3bc3df
13 changed files with 279 additions and 240 deletions
+1 -1
View File
@@ -513,7 +513,7 @@ rational TimelineWidget::PointerTool::ValidateOutTrimming(rational movement,
if (prevent_overwriting) {
// Determine if there's a block in the way
Block* next = block->next();
while (next != nullptr && next->type() != Block::kEnd) {
while (next != nullptr) {
if (next->type() == Block::kClip) {
latest_out = qMin(latest_out, next->in());
break;
+1 -3
View File
@@ -129,9 +129,7 @@ void TimelineWidget::RippleTool::InitiateGhosts(TimelineViewBlockItem *clicked_i
Block* block_before_ripple = track->NearestBlockBefore(earliest_ripple);
// If block is null, there will be no blocks after to ripple
if (block_before_ripple != nullptr
&& block_before_ripple->type() != Block::kEnd
&& block_before_ripple->next()->type() != Block::kEnd) {
if (block_before_ripple != nullptr) {
TimelineViewGhostItem* ghost;
TrackReference track_ref(track->track_type(), track->Index());
+1 -1
View File
@@ -90,7 +90,7 @@ void TimelineWidget::RollingTool::InitiateGhosts(TimelineViewBlockItem *clicked_
if (ghost->mode() == olive::timeline::kTrimIn && ghost_block->previous() != nullptr) {
// Add an extra Ghost for the previous block
AddGhostFromBlock(ghost_block->previous(), ghost->Track(), olive::timeline::kTrimOut);
} else if (ghost->mode() == olive::timeline::kTrimOut && ghost_block->next() != nullptr && ghost_block->next()->type() != Block::kEnd) {
} else if (ghost->mode() == olive::timeline::kTrimOut && ghost_block->next() != nullptr) {
AddGhostFromBlock(ghost_block->next(), ghost->Track(), olive::timeline::kTrimIn);
}
}
+1 -1
View File
@@ -81,7 +81,7 @@ void TimelineWidget::SlideTool::InitiateGhosts(TimelineViewBlockItem *clicked_it
AddGhostFromBlock(ghost_block->previous(), ghost->Track(), olive::timeline::kTrimOut);
}
if (ghost_block->next() != nullptr && ghost_block->next()->type() != Block::kEnd) {
if (ghost_block->next() != nullptr) {
AddGhostFromBlock(ghost_block->next(), ghost->Track(), olive::timeline::kTrimIn);
}
}