bShowFriendlyNames
bShowFriendlyNames
#Overview
name: bShowFriendlyNames
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 18
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bShowFriendlyNames is to control the display of property and function names in the Unreal Engine editor interface. It determines whether C++ names for properties and functions are shown in a more readable, user-friendly format or in their original C++ format.
This setting variable is primarily used in the editor subsystems, particularly in the Blueprint editor, Property editor, and various UI components. It affects how names are displayed in node titles, property panels, and other UI elements throughout the Unreal Engine editor.
The value of this variable is set in the EditorStyleSettings class, which is part of the UnrealEd module. It is initialized to true by default in the constructor of UEditorStyleSettings.
This variable interacts with various name conversion functions, such as FName::NameToDisplayString(), which transforms C++ style names into more readable formats when bShowFriendlyNames is true.
Developers should be aware that changing this setting will affect the display of names throughout the editor interface. It’s particularly important for consistency in user experience and for debugging purposes, as the displayed names may not match exactly with the underlying C++ names when this setting is enabled.
Best practices when using this variable include:
- Consistently using it across all relevant UI components to maintain a uniform experience.
- Considering its state when developing custom editor tools or extensions that display property or function names.
- Being aware that while friendly names improve readability, they may sometimes obscure the exact C++ identifiers, which could be important in certain debugging scenarios.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:89, section: [/Script/UnrealEd.EditorStyleSettings]
- INI Section:
/Script/UnrealEd.EditorStyleSettings
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Animation/GameplayInsights/Source/GameplayInsights/Private/PropertyHelpers.cpp:150
Scope (from outer to inner):
file
function FName FObjectPropertyHelpers::GetPropertyDisplayName
Source code excerpt:
#if WITH_EDITOR
const UEditorStyleSettings* Settings = GetDefault<UEditorStyleSettings>();
const FName OutputName = Settings->bShowFriendlyNames ? *FName::NameToDisplayString(StringName, bIsBool) : *StringName;
#else
const FName OutputName = *FName::NameToDisplayString(StringName, bIsBool);
#endif
return OutputName;
}
#Loc: <Workspace>/Engine/Source/Editor/AnimGraph/Private/AnimGraphNode_CallFunction.cpp:41
Scope (from outer to inner):
file
function FText UAnimGraphNode_CallFunction::GetNodeTitle
Source code excerpt:
{
FunctionName = FText::FromName(CallFunctionPrototype->FunctionReference.GetMemberName());
if ((GEditor != nullptr) && (GetDefault<UEditorStyleSettings>()->bShowFriendlyNames))
{
FunctionName = FText::FromString(FName::NameToDisplayString(FunctionName.ToString(), false));
}
}
else
{
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/BlueprintBoundEventNodeSpawner.cpp:45
Scope (from outer to inner):
file
function static FText BlueprintBoundEventNodeSpawnerImpl::GetDefaultMenuName
Source code excerpt:
static FText BlueprintBoundEventNodeSpawnerImpl::GetDefaultMenuName(FMulticastDelegateProperty const* Delegate)
{
bool const bShowFriendlyNames = GetDefault<UEditorStyleSettings>()->bShowFriendlyNames;
FText const DelegateName = bShowFriendlyNames ? FText::FromString(UEditorEngine::GetFriendlyName(Delegate)) : FText::FromName(Delegate->GetFName());
return FText::Format(LOCTEXT("ComponentEventName", "Add {0}"), DelegateName);
}
//------------------------------------------------------------------------------
static FText BlueprintBoundEventNodeSpawnerImpl::GetDefaultMenuCategory(FMulticastDelegateProperty const* Delegate)
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/BlueprintDelegateNodeSpawner.cpp:42
Scope (from outer to inner):
file
function static FText BlueprintDelegateNodeSpawnerImpl::GetDefaultMenuName
Source code excerpt:
static FText BlueprintDelegateNodeSpawnerImpl::GetDefaultMenuName(FMulticastDelegateProperty const* Delegate)
{
bool const bShowFriendlyNames = GetDefault<UEditorStyleSettings>()->bShowFriendlyNames;
return bShowFriendlyNames ? FText::FromString(UEditorEngine::GetFriendlyName(Delegate)) : FText::FromName(Delegate->GetFName());
}
//------------------------------------------------------------------------------
static FText BlueprintDelegateNodeSpawnerImpl::GetDefaultMenuCategory(FMulticastDelegateProperty const* Delegate)
{
FText DelegateCategory = FText::FromString(FObjectEditorUtils::GetCategory(Delegate));
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/BlueprintVariableNodeSpawner.cpp:315
Scope (from outer to inner):
file
function FText UBlueprintVariableNodeSpawner::GetVariableName
Source code excerpt:
FText VarName;
bool bShowFriendlyNames = GetDefault<UEditorStyleSettings>()->bShowFriendlyNames;
if (IsUserLocalVariable())
{
VarName = bShowFriendlyNames ? FText::FromString(LocalVarDesc.FriendlyName) : FText::FromName(LocalVarDesc.VarName);
}
else if (FProperty const* MemberVariable = GetVarProperty())
{
VarName = bShowFriendlyNames ? FText::FromString(UEditorEngine::GetFriendlyName(MemberVariable)) : FText::FromName(MemberVariable->GetFName());
}
return VarName;
}
#undef LOCTEXT_NAMESPACE
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/EdGraphSchema_K2.cpp:3193
Scope (from outer to inner):
file
function FText UEdGraphSchema_K2::GetPinDisplayName
Source code excerpt:
}
if( GEditor && GetDefault<UEditorStyleSettings>()->bShowFriendlyNames && Pin->bAllowFriendlyName )
{
DisplayName = FText::FromString(FName::NameToDisplayString(DisplayName.ToString(), Pin->PinType.PinCategory == PC_Boolean));
}
}
return DisplayName;
}
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/EdGraphSchema_K2.cpp:5730
Scope (from outer to inner):
file
function void UEdGraphSchema_K2::GetGraphDisplayInformation
Source code excerpt:
}
if( GEditor && GetDefault<UEditorStyleSettings>()->bShowFriendlyNames )
{
if (GraphType == GT_Function && Function)
{
DisplayInfo.DisplayName = GetFriendlySignatureName(Function);
}
else
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/K2Node_AssignDelegate.cpp:41
Scope (from outer to inner):
file
function FText UK2Node_AssignDelegate::GetNodeTitle
Source code excerpt:
if (FProperty* Property = GetProperty())
{
bool const bShowFriendlyNames = GetDefault<UEditorStyleSettings>()->bShowFriendlyNames;
PropertyName = FText::FromString(bShowFriendlyNames ? UEditorEngine::GetFriendlyName(Property) : Property->GetName());
// FText::Format() is slow, so we cache this to save on performance
CachedListTitle.SetCachedText(FText::Format(LOCTEXT("AssignDelegateTitle", "Assign {0}"), PropertyName), this);
}
else
{
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/K2Node_CallFunction.cpp:615
Scope (from outer to inner):
file
function FText UK2Node_CallFunction::GetNodeTitle
Source code excerpt:
{
FunctionName = FText::FromName(FunctionReference.GetMemberName());
if ((GEditor != NULL) && (GetDefault<UEditorStyleSettings>()->bShowFriendlyNames))
{
FunctionName = FText::FromString(FName::NameToDisplayString(FunctionName.ToString(), false));
}
}
if(TitleType == ENodeTitleType::FullTitle)
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/K2Node_CallFunction.cpp:1800
Scope (from outer to inner):
file
function FText UK2Node_CallFunction::GetUserFacingFunctionName
Source code excerpt:
if (Function != NULL)
{
if (GEditor && GetDefault<UEditorStyleSettings>()->bShowFriendlyNames)
{
ReturnDisplayName = Function->GetDisplayNameText();
}
else
{
static const FString Namespace = TEXT("UObjectDisplayNames");
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/K2Node_CallFunction.cpp:1869
Scope (from outer to inner):
file
function FText UK2Node_CallFunction::GetDefaultCategoryForFunction
Source code excerpt:
FText FuncCategory;
// If we are not showing friendly names, return the metadata stored, without localization
if( GEditor && !GetDefault<UEditorStyleSettings>()->bShowFriendlyNames )
{
FuncCategory = FText::FromString(Function->GetMetaData(FBlueprintMetadata::MD_FunctionCategory));
}
else
{
// Look for localized metadata
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/K2Node_CallParentFunction.cpp:36
Scope (from outer to inner):
file
function FText UK2Node_CallParentFunction::GetNodeTitle
Source code excerpt:
FunctionName = GetUserFacingFunctionName( Function );
}
else if ( GEditor && GetDefault<UEditorStyleSettings>()->bShowFriendlyNames )
{
FunctionName = FText::FromString(FName::NameToDisplayString(FunctionReference.GetMemberName().ToString(), false));
}
FFormatNamedArguments Args;
Args.Add(TEXT("FunctionName"), FunctionName);
#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Private/K2Node_MacroInstance.cpp:196
Scope (from outer to inner):
file
function FText UK2Node_MacroInstance::GetNodeTitle
Source code excerpt:
{
Result = FText::FromString(MacroGraph->GetName());
if ((GEditor != NULL) && (GetDefault<UEditorStyleSettings>()->bShowFriendlyNames))
{
Result = FText::FromString(FName::NameToDisplayString(Result.ToString(), false));
}
}
return Result;
#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/BlueprintActionMenuBuilder.cpp:133
Scope (from outer to inner):
file
function TSharedPtr<FBlueprintDragDropMenuItem> FBlueprintActionMenuItemFactory::MakeDragDropMenuItem
Source code excerpt:
if (SampleProperty != nullptr)
{
bool const bShowFriendlyNames = GetDefault<UEditorStyleSettings>()->bShowFriendlyNames;
MenuDescription = bShowFriendlyNames ? FText::FromString(UEditorEngine::GetFriendlyName(SampleProperty)) : FText::FromName(SampleProperty->GetFName());
TooltipDescription = SampleProperty->GetToolTipText();
Category = FObjectEditorUtils::GetCategoryText(SampleProperty);
bool const bIsDelegateProperty = SampleProperty->IsA<FMulticastDelegateProperty>();
if (bIsDelegateProperty && Category.IsEmpty())
#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/FindInBlueprintManager.cpp:265
Scope (from outer to inner):
file
function FTemporarilyUseFriendlyNodeTitles
Source code excerpt:
UEditorStyleSettings* EditorSettings = GetMutableDefault<UEditorStyleSettings>();
// Cache the value of bShowFriendlyNames, we will force it to true for gathering BP search data and then restore it
bCacheShowFriendlyNames = EditorSettings->bShowFriendlyNames;
EditorSettings->bShowFriendlyNames = true;
ForceVisualizationCacheClear();
}
~FTemporarilyUseFriendlyNodeTitles()
{
UEditorStyleSettings* EditorSettings = GetMutableDefault<UEditorStyleSettings>();
EditorSettings->bShowFriendlyNames = bCacheShowFriendlyNames;
ForceVisualizationCacheClear();
}
/** Go through all Schemas and force a visualization cache clear, forcing nodes to refresh their titles */
void ForceVisualizationCacheClear()
{
#Loc: <Workspace>/Engine/Source/Editor/PropertyEditor/Private/ItemPropertyNode.cpp:564
Scope (from outer to inner):
file
function FText FItemPropertyNode::GetDisplayName
Source code excerpt:
PropertyDisplayName = Property->GetName();
}
if( GetDefault<UEditorStyleSettings>()->bShowFriendlyNames )
{
PropertyDisplayName = FName::NameToDisplayString( PropertyDisplayName, bIsBoolProperty );
}
FinalDisplayName = FText::FromString( PropertyDisplayName );
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/EditorStyleSettings.h:129
Scope (from outer to inner):
file
class class UEditorStyleSettings : public UObject
Source code excerpt:
/** When enabled, the C++ names for properties and functions will be displayed in a format that is easier to read */
UPROPERTY(EditAnywhere, config, Category=UserInterface, meta=(DisplayName="Show Friendly Variable Names"))
uint32 bShowFriendlyNames:1;
/** When enabled, the underlying Names for Components inherited from C++ will be shown alongside their UProperty Variable name */
UPROPERTY(EditAnywhere, config, Category = UserInterface, meta = (DisplayName = "Show Underlying Names For Native Components"))
uint32 bShowNativeComponentNames:1;
/** When enabled, the Editor Preferences and Project Settings menu items in the main menu will be expanded with sub-menus for each settings section. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/EditorStyleClasses.cpp:51
Scope (from outer to inner):
file
function UEditorStyleSettings::UEditorStyleSettings
Source code excerpt:
GridSnapSize = 16;
bShowFriendlyNames = true;
bShowNativeComponentNames = true;
}
void UEditorStyleSettings::Init()
{
// if it's a valid id, set current theme ID in USlateThemeManager to CurrentAppliedTheme.