void UMovieSceneSection::AddKeyToCurve(FRichCurve& InCurve, float Time, float Value, EMovieSceneKeyInterpolation Interpolation, const bool bUnwindRotation) { if (IsTimeWithinSection(Time)) { if (TryModify()) { FKeyHandle ExistingKeyHandle = InCurve.FindKey(Time); FKeyHandle NewKeyHandle = InCurve.UpdateOrAddKey(Time, Value, bUnwindRotation); if (!InCurve.IsKeyHandleValid(ExistingKeyHandle) && InCurve.IsKeyHandleValid(NewKeyHandle)) { MovieSceneHelpers::SetKeyInterpolation(InCurve, NewKeyHandle, Interpolation); } } } }