node: send invalidatevisible signal through graph
When dragging a value in the UI, we use a "single frame update" because we want to prioritize the currently visible frame to give visual feedback as soon as possible. Previously, we generated a single frame InvalidateCache() signal from the widgets themselves, but this had the major downside of not necessarily emitting the time that the viewer was actually showing (due to either node time transformations or times differing between the effects panels and the viewer panels). Now, we send a different signal that viewers can handle themselves to update the time that they're currently showing. This means the fast updating will work no matter how many viewers are connected at whatever time each viewer is set to.
This commit is contained in:
@@ -150,6 +150,19 @@ void Node::InvalidateCache(const rational &start_range, const rational &end_rang
|
||||
SendInvalidateCache(start_range, end_range);
|
||||
}
|
||||
|
||||
void Node::InvalidateVisible(NodeInput *from)
|
||||
{
|
||||
Q_UNUSED(from)
|
||||
|
||||
foreach (NodeParam* param, params_) {
|
||||
if (param->type() == NodeParam::kOutput) {
|
||||
foreach (NodeEdgePtr edge, param->edges()) {
|
||||
edge->input()->parentNode()->InvalidateVisible(edge->input());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TimeRange Node::InputTimeAdjustment(NodeInput *input, const TimeRange &input_time) const
|
||||
{
|
||||
// Default behavior is no time adjustment at all
|
||||
|
||||
Reference in New Issue
Block a user