shift renderer prototype to new node structure
This commit is contained in:
+12
-5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user