UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FFrameNumberInterface Struct Reference

#include <FrameNumberNumericInterface.h>

+ Inheritance diagram for FFrameNumberInterface:

Public Member Functions

 FFrameNumberInterface (const TAttribute< EFrameNumberDisplayFormats > &InDisplayFormatAttr, const TAttribute< uint8 > &InOnGetZeroPadFrameNumber, const TAttribute< FFrameRate > &InTickResolutionAttr, const TAttribute< FFrameRate > &InDisplayRateAttr)
 
virtual int32 GetMinFractionalDigits () const override
 
virtual int32 GetMaxFractionalDigits () const override
 
virtual void SetMinFractionalDigits (const TAttribute< TOptional< int32 > > &NewValue) override
 
virtual void SetMaxFractionalDigits (const TAttribute< TOptional< int32 > > &NewValue) override
 
virtual bool IsCharacterValid (TCHAR InChar) const override
 
virtual FString ToString (const double &Value) const override
 
virtual TOptional< doubleFromString (const FString &InString, const double &InExistingValue) override
 
FString GetSubframeIndicator () const
 
void SetSubframeIndicator (const FString &InSubframeIndicator)
 
void DisplayFormatChanged ()
 
virtual FOnSettingChangedGetOnSettingChanged () override
 
- Public Member Functions inherited from INumericTypeInterface< double >
virtual ~INumericTypeInterface ()
 
virtual bool GetIndicateNearlyInteger () const
 
virtual void SetIndicateNearlyInteger (const TAttribute< TOptional< bool > > &NewValue)
 

Detailed Description

A large portion of the Sequencer UI is built around using SpinBox and NumericBox because the framerate used to be stored in (float) seconds. This creates a convenient UI as it allows the users to type in numbers (for frames or seconds), or to drag the mouse to change the time. When Sequencer was converted to using integer based frames and frame rates (expressed as numerator/denominator) the spinbox-based UI became an issue as SpinBox and NumericBox internally convert to a double to perform various calculations. This is an issue if your Spinbox type (ie: FQualifiedFrameTime) is not implicitly convertible to double, which the new Sequencer types are not (due to accidental type coercion when using outside the UI).

To solve this, the Spinboxes will still use double as their type, but double now means frame number and not time. A double can store the entire range of int32 (which backs FFrameNumber) without precision loss, and we can execute callbacks to find out what framerate the sequence is running at. This allows us to display in Timecode, Time or Frames and convert back and forth to double for the UI, and from double into the backing FFrameNumber for the sequence.

Constructor & Destructor Documentation

◆ FFrameNumberInterface()

FFrameNumberInterface::FFrameNumberInterface ( const TAttribute< EFrameNumberDisplayFormats > &  InDisplayFormatAttr,
const TAttribute< uint8 > &  InOnGetZeroPadFrameNumber,
const TAttribute< FFrameRate > &  InTickResolutionAttr,
const TAttribute< FFrameRate > &  InDisplayRateAttr 
)
inline

Member Function Documentation

◆ DisplayFormatChanged()

void FFrameNumberInterface::DisplayFormatChanged ( )
inline

◆ FromString()

virtual TOptional< double > FFrameNumberInterface::FromString ( const FString &  InString,
const double InExistingValue 
)
inlineoverridevirtual

◆ GetMaxFractionalDigits()

virtual int32 FFrameNumberInterface::GetMaxFractionalDigits ( ) const
inlineoverridevirtual

◆ GetMinFractionalDigits()

virtual int32 FFrameNumberInterface::GetMinFractionalDigits ( ) const
inlineoverridevirtual

Gets the minimum and maximum fractional digits.

Implements INumericTypeInterface< double >.

◆ GetOnSettingChanged()

virtual FOnSettingChanged * FFrameNumberInterface::GetOnSettingChanged ( )
inlineoverridevirtual

Optional callback to broadcast when a setting in the type interface changes

Reimplemented from INumericTypeInterface< double >.

◆ GetSubframeIndicator()

FString FFrameNumberInterface::GetSubframeIndicator ( ) const
inline

Gets the string suffix used when a stringified value represents a time between whole frames.

◆ IsCharacterValid()

virtual bool FFrameNumberInterface::IsCharacterValid ( TCHAR  InChar) const
inlineoverridevirtual

Check whether the typed character is valid

Implements INumericTypeInterface< double >.

◆ SetMaxFractionalDigits()

virtual void FFrameNumberInterface::SetMaxFractionalDigits ( const TAttribute< TOptional< int32 > > &  NewValue)
inlineoverridevirtual

◆ SetMinFractionalDigits()

virtual void FFrameNumberInterface::SetMinFractionalDigits ( const TAttribute< TOptional< int32 > > &  NewValue)
inlineoverridevirtual

Sets the minimum and maximum fractional digits - A minimum greater than 0 will always have that many trailing zeros

Implements INumericTypeInterface< double >.

◆ SetSubframeIndicator()

void FFrameNumberInterface::SetSubframeIndicator ( const FString &  InSubframeIndicator)
inline

Sets the string suffix to use when a stringified value represents a time between whole frames.

◆ ToString()

virtual FString FFrameNumberInterface::ToString ( const double Value) const
inlineoverridevirtual

Convert the type to/from a string

Implements INumericTypeInterface< double >.


The documentation for this struct was generated from the following file: