timenode: implemented timenode to allow values to be connected to time
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#include "timeinput.h"
|
||||
|
||||
TimeInput::TimeInput()
|
||||
{
|
||||
}
|
||||
|
||||
Node *TimeInput::copy() const
|
||||
{
|
||||
return new TimeInput();
|
||||
}
|
||||
|
||||
QString TimeInput::Name() const
|
||||
{
|
||||
return tr("Time");
|
||||
}
|
||||
|
||||
QString TimeInput::id() const
|
||||
{
|
||||
return QStringLiteral("org.olivevideoeditor.Olive.videoinput");
|
||||
}
|
||||
|
||||
QString TimeInput::Category() const
|
||||
{
|
||||
return tr("Input");
|
||||
}
|
||||
|
||||
QString TimeInput::Description() const
|
||||
{
|
||||
return tr("Generates the time (in seconds) at this frame");
|
||||
}
|
||||
|
||||
NodeValueTable TimeInput::Value(const NodeValueDatabase &value) const
|
||||
{
|
||||
NodeValueTable table = value.Merge();
|
||||
|
||||
table.Push(NodeParam::kFloat,
|
||||
value[QStringLiteral("global")].Get(NodeParam::kFloat, QStringLiteral("time_in")),
|
||||
QStringLiteral("time"));
|
||||
|
||||
return table;
|
||||
}
|
||||
Reference in New Issue
Block a user