nodes: rewrote and simplified length signaling system

This commit is contained in:
itsmattkc
2021-07-15 21:00:18 -07:00
parent 8350ce300f
commit 4bbc75392a
20 changed files with 148 additions and 241 deletions
+6 -4
View File
@@ -623,6 +623,8 @@ public:
*/
static T* ValueToPtr(const QVariant& ptr);
using InvalidateCacheOptions = QHash<QString, QVariant>;
/**
* @brief Signal all dependent Nodes that anything cached between start_range and end_range is now invalid and
* requires re-rendering
@@ -632,11 +634,11 @@ public:
* the DAG. Even if the time needs to be transformed somehow (e.g. converting media time to sequence time), you can
* call this function with transformed time and relay the signal that way.
*/
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element = -1);
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element = -1, InvalidateCacheOptions options = InvalidateCacheOptions());
void InvalidateCache(const TimeRange& range, const NodeInput& from)
void InvalidateCache(const TimeRange& range, const NodeInput& from, const InvalidateCacheOptions &options = InvalidateCacheOptions())
{
InvalidateCache(range, from.input(), from.element());
InvalidateCache(range, from.input(), from.element(), options);
}
/**
@@ -882,7 +884,7 @@ protected:
SetInputProperty(id, QStringLiteral("combo_str"), strings);
}
void SendInvalidateCache(const TimeRange &range);
void SendInvalidateCache(const TimeRange &range, const InvalidateCacheOptions &options);
/**
* @brief Don't send cache invalidation signals if `input` is connected or disconnected