preliminary support for multiple timeline sections

This commit is contained in:
itsmattkc
2019-10-05 07:33:27 +10:00
parent ea4f6f43c4
commit 3411e45774
26 changed files with 897 additions and 363 deletions
+14
View File
@@ -405,3 +405,17 @@ void TrackOutput::ReplaceBlock(Block *old, Block *replace)
InvalidateCache(replace->in(), replace->out());
}
TrackOutput *TrackOutput::TrackFromBlock(Block *block)
{
Block* n = block;
// Find last valid block in Sequence and assume its a track
while (n->next() != nullptr) {
n = n->next();
}
// Downside of this approach is the usage of dynamic_cast, alternative would be looping through all known tracks and
// seeing if the contain the Block, but this seems slower
return dynamic_cast<TrackOutput*>(n);
}