engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FFrameNumberInterface结构体 参考

A large portion of the Sequencer UI is built around using SpinBox and NumericBox because the framerate used to be stored in (float) seconds. 更多...

#include <FrameNumberNumericInterface.h>

+ 类 FFrameNumberInterface 继承关系图:

Public 成员函数

virtual int32 GetMinFractionalDigits () const override
 Gets the minimum and maximum fractional digits.
 
virtual bool IsCharacterValid (TCHAR InChar) const override
 Check whether the typed character is valid
 
virtual void SetMinFractionalDigits (const TAttribute< TOptional< int32 > > &NewValue) override
 Sets the minimum and maximum fractional digits - A minimum greater than 0 will always have that many trailing zeros
 
virtual FString ToString (const double &Value) const override
 Convert the type to/from a string
 
virtual int32 GetMinFractionalDigits () const=0
 Gets the minimum and maximum fractional digits.
 
virtual bool IsCharacterValid (TCHAR InChar) const=0
 Check whether the typed character is valid
 
virtual void SetMinFractionalDigits (const TAttribute< TOptional< int32 > > &NewValue)=0
 Sets the minimum and maximum fractional digits - A minimum greater than 0 will always have that many trailing zeros
 
virtual FString ToString (const double &Value) const=0
 Convert the type to/from a string
 

详细描述

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.


该结构体的文档由以下文件生成: