created clip block node

This commit is contained in:
itsmattkc
2019-07-28 01:27:06 -07:00
parent 32b8d0a7d6
commit 32c7d089aa
10 changed files with 173 additions and 17 deletions
+24 -3
View File
@@ -1,7 +1,28 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "timeline.h"
TimelineBlock::TimelineBlock() :
current_block_(nullptr)
current_block_(nullptr),
attached_timeline_(nullptr)
{
}
@@ -17,7 +38,7 @@ void TimelineBlock::Process(const rational &time)
// This node represents the end of the timeline, so if the time is beyond its start, there's no image to display
if (time >= in()) {
texture_output_->set_value(0);
texture_output()->set_value(0);
current_block_ = nullptr;
return;
}
@@ -38,5 +59,5 @@ void TimelineBlock::Process(const rational &time)
}
// At this point, we must have found the correct block so we use its texture output to produce the image
texture_output_->set_value(current_block_->texture_output()->get_value(time));
texture_output()->set_value(current_block_->texture_output()->get_value(time));
}