[4.20] How to get values of UMovieScene3DTransformSection frame?

So… Sequencer API changed again, although updating most of the stuff was easy.
I can’t figure out how to read get value of UMovieScene3DTransformSection frame. This is what worked for 4.19.

const UMovieScene3DTransformSection* Section = Cast<UMovieScene3DTransformSection>(MovieSceneHelpers::FindSectionAtTime(Track->GetAllSections(), CurrentFrame));
			if (Section)
			{
				FRotator Rotation = FRotator
				(
					Section->GetRotationCurve(EAxis::Y).Eval(CurrentFrame),
					Section->GetRotationCurve(EAxis::Z).Eval(CurrentFrame),
					Section->GetRotationCurve(EAxis::X).Eval(CurrentFrame)
				);
				FVector Translation = FVector
				(
					Section->GetTranslationCurve(EAxis::X).Eval(CurrentFrame),
					Section->GetTranslationCurve(EAxis::Y).Eval(CurrentFrame),
					Section->GetTranslationCurve(EAxis::Z).Eval(CurrentFrame)
				);
				FVector Scale = FVector
				(
					Section->GetScaleCurve(EAxis::X).Eval(CurrentFrame),
					Section->GetScaleCurve(EAxis::Y).Eval(CurrentFrame),
					Section->GetScaleCurve(EAxis::Z).Eval(CurrentFrame)
				);
             }

The sections now have a channel proxy where you get the channels from. Like this:

TArrayView<FMovieSceneFloatChannel*> FloatChannels = Section->GetChannelProxy().GetChannels<FMovieSceneFloatChannel>();

Then you can evaluate the curve for each of the channels

FloatChannels[0]->Evaluate(CurrentFrame);

Thanks! You’re always a huge help :slight_smile: