Fixing a bug in Keyframe that caused the GetDelta() function to return 0.0 early - which was breaking reversed time curves (zero'ing out the first frame or two)

This commit is contained in:
Jonathan Thomas
2025-09-26 18:35:29 -05:00
parent 0c15c1692e
commit 4cef4da9ef

View File

@@ -399,7 +399,7 @@ void Keyframe::SetJsonValue(const Json::Value root) {
double Keyframe::GetDelta(int64_t index) const {
if (index < 1) return 0.0;
if (index == 1 && !Points.empty()) return Points[0].co.Y;
if (index >= GetLength()) return 0.0;
if (index > GetLength()) return 1.0;
return GetValue(index) - GetValue(index - 1);
}