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:
itsmattkc
2019-11-23 08:51:15 +09:00
parent b1535b73b7
commit b233aa5319
4 changed files with 56 additions and 14 deletions
+13
View File
@@ -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);
}