connect length to viewer node for now
This commit is contained in:
@@ -24,9 +24,13 @@ ViewerOutput::ViewerOutput() :
|
||||
viewer_width_(0),
|
||||
viewer_height_(0)
|
||||
{
|
||||
texture_input_ = new NodeInput("tex_out");
|
||||
texture_input_ = new NodeInput("tex_in");
|
||||
texture_input_->add_data_input(NodeInput::kTexture);
|
||||
AddParameter(texture_input_);
|
||||
|
||||
length_input_ = new NodeInput("length_in");
|
||||
length_input_->add_data_input(NodeInput::kRational);
|
||||
AddParameter(length_input_);
|
||||
}
|
||||
|
||||
QString ViewerOutput::Name()
|
||||
@@ -66,6 +70,11 @@ NodeInput *ViewerOutput::texture_input()
|
||||
return texture_input_;
|
||||
}
|
||||
|
||||
NodeInput *ViewerOutput::length_input()
|
||||
{
|
||||
return length_input_;
|
||||
}
|
||||
|
||||
RenderTexturePtr ViewerOutput::GetTexture(const rational &time)
|
||||
{
|
||||
return texture_input_->get_value(time).value<RenderTexturePtr>();
|
||||
@@ -98,6 +107,11 @@ const int &ViewerOutput::ViewerHeight()
|
||||
return viewer_height_;
|
||||
}
|
||||
|
||||
rational ViewerOutput::Length()
|
||||
{
|
||||
return length_input_->get_value(0).value<rational>();
|
||||
}
|
||||
|
||||
QVariant ViewerOutput::Value(NodeOutput *output, const rational &time)
|
||||
{
|
||||
Q_UNUSED(output)
|
||||
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
void SetTimebase(const rational& timebase);
|
||||
|
||||
NodeInput* texture_input();
|
||||
NodeInput* length_input();
|
||||
|
||||
RenderTexturePtr GetTexture(const rational& time);
|
||||
|
||||
@@ -54,6 +55,8 @@ public:
|
||||
const int& ViewerWidth();
|
||||
const int& ViewerHeight();
|
||||
|
||||
rational Length();
|
||||
|
||||
signals:
|
||||
void TimebaseChanged(const rational&);
|
||||
|
||||
@@ -67,6 +70,8 @@ protected:
|
||||
private:
|
||||
NodeInput* texture_input_;
|
||||
|
||||
NodeInput* length_input_;
|
||||
|
||||
rational timebase_;
|
||||
|
||||
int viewer_width_;
|
||||
|
||||
Reference in New Issue
Block a user