nodes are given a time range

This commit is contained in:
itsmattkc
2019-10-22 14:58:06 +11:00
parent 9da5e7c9be
commit 5f86b9b9c7
32 changed files with 110 additions and 77 deletions
+5 -4
View File
@@ -69,22 +69,23 @@ Node *NodeInput::get_connected_node()
return nullptr;
}
QVariant NodeInput::get_value(const rational& time)
QVariant NodeInput::get_value(const rational& in, const rational& out)
{
QVariant v;
if (time_ != time || !value_caching_) {
if (in_ != in || out_ != out || !value_caching_) {
// Retrieve the value
if (!edges_.isEmpty()) {
// A connection - use the output of the connected Node
value_ = get_connected_output()->get_value(time);
value_ = get_connected_output()->get_value(in, out);
} else {
// No connections - use the internal value
// FIXME: Re-implement keyframing
value_ = keyframes_.first().value();
}
time_ = time;
in_ = in;
out_ = out;
}
v = value_;