UE-80077

UAnimSequenceBase::GetNumberOfFrames off by 1

UAnimSequenceBase::GetNumberOfFrames off by 1

Creating a montage from a default frame rate and rate scale sequence reports 1 less frame than the sequence. The difference is a result of UAnimSequence overriding UAnimSequenceBase::GetNumberOfFrames. As frame rate is calculated by (frames-1)/length, then GetNumberOfFrames should be modified to return (rate*length)+1.

Steps to Reproduce

Browse to an animation asset with a frame rate equal to the default sample rate(30) and a rate scale of 1 in the content browser.

Hovering over it, notice its Number of Keys.

Opening it, notice the divisor of its 'CurrentFrame: # / # Frame' is Number of Keys -1.

Create a new montage from the sequence and open it.

Notice the divisor of its 'CurrentFrame: # / # Frame' is Number of Keys -2.

Expected: A montage created from a sequence with the same frame rate and default rate scale should report the same number of frames.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-80077 in the post.