renderer: always hash along edges

This commit is contained in:
itsmattkc
2021-09-19 23:11:20 -07:00
parent 67c7c71ca2
commit 7ba5dca4ab
30 changed files with 76 additions and 59 deletions
+2 -3
View File
@@ -93,16 +93,15 @@ void TimeRemapNode::Retranslate()
SetInputName(kInputInput, QStringLiteral("Input"));
}
void TimeRemapNode::Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void TimeRemapNode::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
// Don't hash anything of our own, just pass-through to the connected node at the remapped tmie
Q_UNUSED(output)
if (IsInputConnected(kInputInput)) {
Node *out = GetConnectedOutput(kInputInput);
NodeGlobals new_globals = globals;
new_globals.set_time(TimeRange(GetRemappedTime(globals.time().in()), GetRemappedTime(globals.time().out())));
out->Hash(GetValueHintForInput(kInputInput, -1), hash, new_globals, video_params);
Node::Hash(out, GetValueHintForInput(kInputInput), hash, new_globals, video_params);
}
}
+3 -2
View File
@@ -45,11 +45,12 @@ public:
virtual void Retranslate() override;
virtual void Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
static const QString kTimeInput;
static const QString kInputInput;
protected:
virtual void Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
private:
rational GetRemappedTime(const rational& input) const;