ShowMeshStats
ShowMeshStats
#Overview
name: ShowMeshStats
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowMeshStats is to control the display of mesh statistics in the Unreal Engine 5 animation viewport. It is used to determine the level of detail for mesh information shown to the user in the animation editing interface.
This setting variable is primarily used in the Persona module, which is part of the animation system in Unreal Engine 5. Specifically, it is utilized in the Animation Editor viewport client.
The value of this variable is set in the UPersonaOptions class, which is a configuration class for Persona-related settings. It can be modified through the engine’s configuration system or programmatically using the SetShowMeshStats function.
ShowMeshStats interacts with other variables in the FAnimationViewportClient class, such as bShowMeshStats. The combination of these variables determines whether and how mesh statistics are displayed.
Developers must be aware that ShowMeshStats is an enumeration-like integer, representing different levels of detail for mesh statistics (None, Basic, and Detailed). The actual values correspond to the EDisplayInfoMode enum.
Best practices when using this variable include:
- Use the provided getter functions (IsShowingMeshStats, IsShowingSelectedNodeStats, IsDetailedMeshStats) instead of accessing the variable directly.
- When setting the value, use the SetShowMeshStats function to ensure proper configuration saving.
- Consider the performance implications of showing detailed mesh stats, especially for complex scenes or lower-end hardware.
- Use this setting in conjunction with other viewport settings to provide a comprehensive and user-friendly debugging experience for animators and technical artists.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:548, section: [/Script/UnrealEd.PersonaOptions]
- INI Section:
/Script/UnrealEd.PersonaOptions
- Raw value:
1
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimationEditorViewportClient.cpp:2328
Scope (from outer to inner):
file
function bool FAnimationViewportClient::IsShowingMeshStats
Source code excerpt:
bool FAnimationViewportClient::IsShowingMeshStats() const
{
const bool bShouldBeEnabled = ConfigOption->ShowMeshStats != EDisplayInfoMode::None;
return bShouldBeEnabled && bShowMeshStats;
}
bool FAnimationViewportClient::IsShowingSelectedNodeStats() const
{
return ConfigOption->ShowMeshStats == EDisplayInfoMode::SkeletalControls;
}
bool FAnimationViewportClient::IsDetailedMeshStats() const
{
return ConfigOption->ShowMeshStats == EDisplayInfoMode::Detailed;
}
int32 FAnimationViewportClient::GetShowMeshStats() const
{
return ConfigOption->ShowMeshStats;
}
void FAnimationViewportClient::OnAssetViewerSettingsChanged(const FName& InPropertyName)
{
if (InPropertyName == GET_MEMBER_NAME_CHECKED(FPreviewSceneProfile, bPostProcessingEnabled) || InPropertyName == NAME_None)
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/PersonaOptions.h:133
Scope (from outer to inner):
file
class class UPersonaOptions : public UObject
Source code excerpt:
/** Currently Stats can have None, Basic and Detailed. Please refer to EDisplayInfoMode. */
UPROPERTY(EditAnywhere, config, Category = "Viewport", meta=(ClampMin ="0", ClampMax = "3", UIMin = "0", UIMax = "3"))
int32 ShowMeshStats;
/** Index used to determine which ViewMode should be used by default for the Animation Editor(s)*/
UPROPERTY(EditAnywhere, config, Category = "Viewport")
uint32 DefaultLocalAxesSelection;
/** Index used to determine which Bone Draw Mode should be used by default for the Animation Editor(s)*/
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/PreferenceStubs.cpp:256
Scope (from outer to inner):
file
function void UPersonaOptions::SetShowMeshStats
Source code excerpt:
void UPersonaOptions::SetShowMeshStats( int32 InShowMeshStats )
{
ShowMeshStats = InShowMeshStats;
SaveConfig();
}
void UPersonaOptions::SetSectionTimingNodeColor(const FLinearColor& InColor)
{