shift renderer prototype to new node structure

This commit is contained in:
itsmattkc
2019-08-28 02:40:44 +10:00
parent 5afe7d523c
commit 7dc2290496
26 changed files with 264 additions and 395 deletions
+12 -5
View File
@@ -23,8 +23,7 @@
#include "node/node.h"
NodeOutput::NodeOutput(const QString &id) :
NodeParam(id),
time_(-1)
NodeParam(id)
{
}
@@ -48,8 +47,12 @@ void NodeOutput::set_data_type(const NodeParam::DataType &type)
}
}
const QVariant &NodeOutput::get_value(const rational& time)
QVariant NodeOutput::get_value(const rational& time)
{
QVariant v;
lock_.lock();
if (time_ != time) {
// Update the value
value_ = parent()->Run(this, time);
@@ -57,6 +60,10 @@ const QVariant &NodeOutput::get_value(const rational& time)
time_ = time;
}
// The value should be have been set by this point
return value_;
v = value_;
lock_.unlock();
return v;
}