RealDocs

UKismetMathLibrary::BreakQualifiedFrameTime

function Engine Blueprint Since 4.23
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Decomposes an FQualifiedFrameTime into its constituent frame number, frame rate, and sub-frame offset. The Blueprint counterpart of MakeQualifiedFrameTime, used to inspect frame positions received from Sequencer or animation systems.

Caveats & Gotchas

  • The returned FrameRate is the rate embedded in the FQualifiedFrameTime, not necessarily the rate of the owning Sequencer sequence. These can differ if the time was converted between rates; always verify which rate context you are in before using the Frame value.
  • SubFrame is in [0, 1) by valid convention, but if the struct was constructed with bad data, it can be out of range. Do not assume it is clamped.

Signature

static ENGINE_API void BreakQualifiedFrameTime(const FQualifiedFrameTime& InFrameTime, FFrameNumber& Frame, FFrameRate& FrameRate, float& SubFrame);

Parameters

Name Type Description Default
InFrameTime const FQualifiedFrameTime& The frame time to decompose.
Frame FFrameNumber& Receives the integer frame number.
FrameRate FFrameRate& Receives the frame rate stored in the qualified time.
SubFrame float& Receives the sub-frame offset in [0, 1).

Return Type

void

Example

Log the current Sequencer position C++
FQualifiedFrameTime CurrentTime = Sequencer->GetLocalTime();
FFrameNumber Frame;
FFrameRate Rate;
float Sub;
UKismetMathLibrary::BreakQualifiedFrameTime(CurrentTime, Frame, Rate, Sub);
UE_LOG(LogTemp, Log, TEXT("Frame %d at %d/%d fps, sub=%.3f"),
    Frame.Value, Rate.Numerator, Rate.Denominator, Sub);

Version History

Introduced in: 4.23

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.