some ripple behavior fixes
This commit is contained in:
@@ -147,6 +147,18 @@ NodeOutput* TrackOutput::track_output()
|
||||
return track_output_;
|
||||
}
|
||||
|
||||
Block *TrackOutput::NearestBlockBefore(const rational &time)
|
||||
{
|
||||
foreach (Block* block, block_cache_) {
|
||||
// Blocks are sorted by time, so the first Block who's out point is at/after this time is the correct Block
|
||||
if (block->out() >= time) {
|
||||
return block;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Block *TrackOutput::NearestBlockAfter(const rational &time)
|
||||
{
|
||||
foreach (Block* block, block_cache_) {
|
||||
|
||||
@@ -59,6 +59,8 @@ public:
|
||||
|
||||
NodeOutput* track_output();
|
||||
|
||||
Block* NearestBlockBefore(const rational& time);
|
||||
|
||||
Block* NearestBlockAfter(const rational& time);
|
||||
|
||||
const QVector<Block*>& Blocks();
|
||||
|
||||
Reference in New Issue
Block a user