sweeping node graph changes for new rendering pipeline
The new rendering pipeline strives to simplify the nodes themselves as much as possible and move much of the logic to an external rendering engine. This change removes all of the responsibilities that no longer belong to the nodes themselves and will soon be folded into the renderer.
This commit is contained in:
@@ -93,11 +93,8 @@ const rational &TimelineOutput::Timebase()
|
||||
return timebase_;
|
||||
}
|
||||
|
||||
QVariant TimelineOutput::Value(NodeOutput *output, const rational &in, const rational &out)
|
||||
QVariant TimelineOutput::Value(NodeOutput *output)
|
||||
{
|
||||
Q_UNUSED(in)
|
||||
Q_UNUSED(out)
|
||||
|
||||
if (output == length_output_) {
|
||||
return QVariant::fromValue(length_);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ signals:
|
||||
void TrackRemoved(TrackOutput* track);
|
||||
|
||||
protected:
|
||||
virtual QVariant Value(NodeOutput* output, const rational &in, const rational &out) override;
|
||||
virtual QVariant Value(NodeOutput* output) override;
|
||||
|
||||
private:
|
||||
QVector<NodeInput*> track_inputs_;
|
||||
|
||||
@@ -34,7 +34,7 @@ TrackList::TrackList(TimelineOutput* parent, const enum TrackType &type, NodeInp
|
||||
|
||||
TrackOutput *TrackList::attached_track()
|
||||
{
|
||||
return Node::ValueToPtr<TrackOutput>(track_input_->get_value(0));
|
||||
return Node::ValueToPtr<TrackOutput>(track_input_->get_realtime_value_of_connected_output());
|
||||
}
|
||||
|
||||
void TrackList::AttachTrack(TrackOutput *track)
|
||||
@@ -176,7 +176,7 @@ void TrackList::TrackConnectionRemoved(NodeEdgePtr edge)
|
||||
return;
|
||||
}
|
||||
|
||||
DetachTrack(Node::ValueToPtr<TrackOutput>(edge->output()->get_value(0, 0)));
|
||||
DetachTrack(Node::ValueToPtr<TrackOutput>(edge->output()->get_realtime_value()));
|
||||
}
|
||||
|
||||
void TrackList::TrackEdgeAdded(NodeEdgePtr edge)
|
||||
@@ -186,7 +186,7 @@ void TrackList::TrackEdgeAdded(NodeEdgePtr edge)
|
||||
|
||||
// If this edge pertains to the track's track input, all the tracks just added need attaching
|
||||
if (edge->input() == track->track_input()) {
|
||||
TrackOutput* added_track = Node::ValueToPtr<TrackOutput>(edge->output()->get_value(0, 0));
|
||||
TrackOutput* added_track = Node::ValueToPtr<TrackOutput>(edge->output()->get_realtime_value());
|
||||
|
||||
AttachTrack(added_track);
|
||||
}
|
||||
@@ -199,7 +199,7 @@ void TrackList::TrackEdgeRemoved(NodeEdgePtr edge)
|
||||
|
||||
// If this edge pertains to the track's track input, all the tracks just added need attaching
|
||||
if (edge->input() == track->track_input()) {
|
||||
TrackOutput* added_track = Node::ValueToPtr<TrackOutput>(edge->output()->get_value(0, 0));
|
||||
TrackOutput* added_track = Node::ValueToPtr<TrackOutput>(edge->output()->get_realtime_value());
|
||||
|
||||
DetachTrack(added_track);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ QList<NodeDependency> TrackOutput::RunDependencies(NodeOutput* output, const rat
|
||||
|
||||
TrackOutput *TrackOutput::next_track()
|
||||
{
|
||||
return ValueToPtr<TrackOutput>(track_input_->get_value(0));
|
||||
return ValueToPtr<TrackOutput>(track_input_->get_realtime_value_of_connected_output());
|
||||
}
|
||||
|
||||
NodeInput *TrackOutput::track_input()
|
||||
@@ -191,12 +191,12 @@ void TrackOutput::InvalidateCache(const rational &start_range, const rational &e
|
||||
}
|
||||
}
|
||||
|
||||
QVariant TrackOutput::Value(NodeOutput *output, const rational &in, const rational &out)
|
||||
QVariant TrackOutput::Value(NodeOutput *output)
|
||||
{
|
||||
if (output == track_output_) {
|
||||
// Set track output correctly
|
||||
return PtrToValue(this);
|
||||
} else if (output == buffer_output()) {
|
||||
/*} else if (output == buffer_output()) {
|
||||
ValidateCurrentBlock(in);
|
||||
|
||||
if (current_block_ != this) {
|
||||
@@ -205,11 +205,11 @@ QVariant TrackOutput::Value(NodeOutput *output, const rational &in, const ration
|
||||
}
|
||||
|
||||
// No texture is valid
|
||||
return 0;
|
||||
return 0;*/
|
||||
}
|
||||
|
||||
// Run default node processing
|
||||
return Block::Value(output, in, out);
|
||||
return Block::Value(output);
|
||||
}
|
||||
|
||||
void TrackOutput::InsertBlockBetweenBlocks(Block *block, Block *before, Block *after)
|
||||
|
||||
@@ -146,7 +146,7 @@ signals:
|
||||
void BlockRemoved(Block* block);
|
||||
|
||||
protected:
|
||||
virtual QVariant Value(NodeOutput* output, const rational& in, const rational &out) override;
|
||||
virtual QVariant Value(NodeOutput* output) override;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
||||
@@ -104,14 +104,5 @@ void ViewerOutput::set_audio_params(const AudioParams &audio)
|
||||
|
||||
rational ViewerOutput::Length()
|
||||
{
|
||||
return length_input_->get_value(0).value<rational>();
|
||||
}
|
||||
|
||||
QVariant ViewerOutput::Value(NodeOutput *output, const rational &in, const rational &out)
|
||||
{
|
||||
Q_UNUSED(output)
|
||||
Q_UNUSED(in)
|
||||
Q_UNUSED(out)
|
||||
|
||||
return 0;
|
||||
return length_input_->get_realtime_value_of_connected_output().value<rational>();
|
||||
}
|
||||
|
||||
@@ -62,9 +62,6 @@ signals:
|
||||
|
||||
void SizeChanged(int width, int height);
|
||||
|
||||
protected:
|
||||
virtual QVariant Value(NodeOutput* output, const rational &in, const rational &out) override;
|
||||
|
||||
private:
|
||||
NodeInput* texture_input_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user