added signal for an edge changing that can ripple through the graph
Useful for detecting when a graph needs recompiling, in tandem with the "InvalidateCache()" signal when necessary, this signal ripples through the nodes when any of the connections change which will likely need handling by the renderer.
This commit is contained in:
@@ -117,3 +117,16 @@ rational ViewerOutput::Length()
|
||||
{
|
||||
return length_input_->get_realtime_value_of_connected_output().value<rational>();
|
||||
}
|
||||
|
||||
void ViewerOutput::DependentEdgeChanged(NodeInput *from)
|
||||
{
|
||||
if (from == texture_input_) {
|
||||
emit VideoGraphChanged();
|
||||
} else if (from == samples_input_) {
|
||||
emit AudioGraphChanged();
|
||||
}
|
||||
|
||||
// NOTE: This node technically has no outputs so default behavior is unnecessary, but if this node gets outputs some
|
||||
// day this should be uncommented
|
||||
//Node::DependentEdgeChanged(from);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user