render: properly defined "out of bounds time" behavior with footage
If a user extends a clip beyond the footage's length, they can choose whether they want a black frame, the last frame continued, or for the footage to loop infinitely (same for extending earlier than the start of footage).
This commit is contained in:
@@ -285,10 +285,14 @@ void NodeTraverser::PostProcessTable(const Node *node, const QString& output, co
|
||||
FootageJob job = v.data().value<FootageJob>();
|
||||
|
||||
if (job.type() == Track::kVideo) {
|
||||
QVariant value = ProcessVideoFootage(job, range.in());
|
||||
rational footage_time = Footage::AdjustTimeByLoopMode(range.in(), job.loop_mode(), job.length());
|
||||
|
||||
if (!value.isNull()) {
|
||||
output_params.Push(NodeValue::kTexture, value, node);
|
||||
if (!footage_time.isNaN()) {
|
||||
QVariant value = ProcessVideoFootage(job, footage_time);
|
||||
|
||||
if (!value.isNull()) {
|
||||
output_params.Push(NodeValue::kTexture, value, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user