diff --git a/app/node/time/timeremap/timeremap.cpp b/app/node/time/timeremap/timeremap.cpp index b17251938..64b12ab28 100644 --- a/app/node/time/timeremap/timeremap.cpp +++ b/app/node/time/timeremap/timeremap.cpp @@ -35,9 +35,6 @@ TimeRemapNode::TimeRemapNode() SetInputProperty(kTimeInput, QStringLiteral("view"), RationalSlider::kTime); SetInputProperty(kTimeInput, QStringLiteral("viewlock"), true); - // Ignore the hashing from time since we just pass through to the input - IgnoreHashingFrom(kTimeInput); - AddInput(kInputInput, NodeValue::kNone, InputFlags(kInputFlagNotKeyframable)); } @@ -69,7 +66,7 @@ QString TimeRemapNode::Description() const TimeRange TimeRemapNode::InputTimeAdjustment(const QString &input, int element, const TimeRange &input_time) const { if (input == kInputInput) { - rational target_time = GetValueAtTime(kTimeInput, input_time.in()).value(); + rational target_time = GetRemappedTime(input_time.in()); return TimeRange(target_time, target_time + input_time.length()); } else { @@ -101,4 +98,19 @@ QVector TimeRemapNode::inputs_for_output(const QString &output) const return {kInputInput}; } +void TimeRemapNode::Hash(const QString &output, QCryptographicHash &hash, const rational &time) 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)) { + NodeOutput out = GetConnectedOutput(kInputInput); + out.node()->Hash(out.output(), hash, GetRemappedTime(time)); + } +} + +rational TimeRemapNode::GetRemappedTime(const rational &input) const +{ + return GetValueAtTime(kTimeInput, input).value(); +} + } diff --git a/app/node/time/timeremap/timeremap.h b/app/node/time/timeremap/timeremap.h index 13e3bbcc8..cf89e41a8 100644 --- a/app/node/time/timeremap/timeremap.h +++ b/app/node/time/timeremap/timeremap.h @@ -47,9 +47,14 @@ public: virtual QVector inputs_for_output(const QString &output) const override; + virtual void Hash(const QString &output, QCryptographicHash &hash, const rational &time) const override; + static const QString kTimeInput; static const QString kInputInput; +private: + rational GetRemappedTime(const rational& input) const; + }; }