ZeroPadFrames
ZeroPadFrames
#Overview
name: ZeroPadFrames
The value of this variable can be defined or overridden in .ini config files. 5
.ini config files referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ZeroPadFrames is to control the formatting of frame numbers in the Unreal Engine 5 Sequencer, specifically the number of leading zeros to add when displaying frame numbers.
This setting variable is primarily used in the Sequencer module of Unreal Engine 5, which is part of the Editor subsystem. It’s utilized in the timeline display and frame number formatting within the Sequencer tool.
The value of this variable is set in the USequencerSettings class constructor and can be modified through the SetZeroPadFrames function. It’s stored as a config property, meaning it persists between editor sessions.
ZeroPadFrames interacts with other Sequencer-related variables, such as JumpFrameIncrement, and is used in conjunction with time display and frame rate calculations.
Developers should be aware that changing this value will affect the visual representation of frame numbers in the Sequencer interface. It’s particularly important when working with animations or cinematics that require precise frame counting or when collaborating with team members who may be used to a specific frame number format.
Best practices for using this variable include:
- Choosing a consistent ZeroPadFrames value across your project to maintain uniformity.
- Considering the maximum frame count in your sequences when setting this value to ensure all frame numbers are displayed clearly.
- Communicating any changes to this setting with your team to avoid confusion in frame references.
- Using the SetZeroPadFrames function to modify this value programmatically, as it handles config saving and necessary event broadcasting.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:853, section: [LevelSequenceEditor SequencerSettings]
- INI Section:
LevelSequenceEditor SequencerSettings
- Raw value:
4
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:861, section: [TemplateSequenceEditor SequencerSettings]
- INI Section:
TemplateSequenceEditor SequencerSettings
- Raw value:
4
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:869, section: [TakeRecorderSequenceEditor SequencerSettings]
- INI Section:
TakeRecorderSequenceEditor SequencerSettings
- Raw value:
4
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:879, section: [EmbeddedActorSequenceEditor SequencerSettings]
- INI Section:
EmbeddedActorSequenceEditor SequencerSettings
- Raw value:
4
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:906, section: [DaySequenceEditor SequencerSettings]
- INI Section:
DaySequenceEditor SequencerSettings
- Raw value:
4
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/SequencerSettings.cpp:44
Scope (from outer to inner):
file
function USequencerSettings::USequencerSettings
Source code excerpt:
bCompileDirectorOnEvaluate = true;
bLeftMouseDragDoesMarquee = false;
ZeroPadFrames = 0;
JumpFrameIncrement = FFrameNumber(5);
bShowLayerBars = true;
bShowKeyBars = true;
bInfiniteKeyAreas = false;
bShowChannelColors = false;
bShowInfoButton = true;
#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/SequencerSettings.cpp:542
Scope (from outer to inner):
file
function uint8 USequencerSettings::GetZeroPadFrames
Source code excerpt:
uint8 USequencerSettings::GetZeroPadFrames() const
{
return ZeroPadFrames;
}
void USequencerSettings::SetZeroPadFrames(uint8 InZeroPadFrames)
{
if (ZeroPadFrames != InZeroPadFrames)
{
ZeroPadFrames = InZeroPadFrames;
SaveConfig();
OnTimeDisplayFormatChangedEvent.Broadcast();
}
}
FFrameNumber USequencerSettings::GetJumpFrameIncrement() const
#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Tools/SequencerEditTool_Movement.cpp:557
Scope (from outer to inner):
file
function FString FSequencerEditTool_Movement::TimeToString
Source code excerpt:
FFrameTime DisplayTime = FFrameRate::TransformTime(Time, TickResolution, DisplayRate);
FString SubframeIndicator = FMath::IsNearlyZero(DisplayTime.GetSubFrame()) ? TEXT("") : TEXT("*");
int32 ZeroPadFrames = Sequencer.GetSequencerSettings()->GetZeroPadFrames();
return IsDelta ? FString::Printf(TEXT("[%+0*d%s]"), ZeroPadFrames, DisplayTime.GetFrame().Value, *SubframeIndicator) : FString::Printf(TEXT("%0*d%s"), ZeroPadFrames, DisplayTime.GetFrame().Value, *SubframeIndicator);
}
case EFrameNumberDisplayFormats::NonDropFrameTimecode:
{
FFrameRate SourceFrameRate = Sequencer.GetFocusedTickResolution();
FFrameRate DestinationFrameRate = Sequencer.GetFocusedDisplayRate();
#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Public/SequencerSettings.h:616
Scope (from outer to inner):
file
class class USequencerSettings : public UObject
Source code excerpt:
/** The number of zeros to pad the frame numbers by. */
UPROPERTY( config, EditAnywhere, Category=Timeline )
uint8 ZeroPadFrames;
/** The number of frames to jump by when jumping forward or backwards. */
UPROPERTY( config, EditAnywhere, Category=Timeline )
FFrameNumber JumpFrameIncrement;
/** Enable or disable the layer bars to edit keyframes in bulk. */