DisplayFolders
DisplayFolders
#Overview
name: DisplayFolders
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 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of DisplayFolders is to control the visibility of folders in the asset view of the Unreal Engine Content Browser. It’s a setting that affects how assets are organized and displayed within the editor’s content management system.
This setting variable is primarily used by the Content Browser module in Unreal Engine. It’s referenced in several files within the ContentBrowser and UnrealEd modules, indicating its importance in the editor’s user interface and asset management systems.
The value of this variable is set in the UContentBrowserSettings class, which is a configuration class for the Content Browser. It can be modified through the editor settings or programmatically.
DisplayFolders interacts with other variables such as DisplayEmptyFolders, which determines whether empty folders should be shown. It’s also related to other Content Browser settings like showing localized content, plugin content, and C++ folders.
Developers should be aware that changing this variable affects the overall organization and navigation of assets in the Content Browser. When DisplayFolders is set to false, it implies that only assets in selected folders will be shown, which can significantly change the user experience.
Best practices when using this variable include:
- Consider the project’s asset organization strategy before changing this setting.
- Be consistent across the project to avoid confusion among team members.
- Remember that hiding folders might make it harder to navigate complex asset structures.
- Use in conjunction with other Content Browser settings for a comprehensive asset view customization.
- Be aware that this setting can be overridden by instance configurations in specific Content Browser instances.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorSettings.ini:25, section: [/Script/UnrealEd.ContentBrowserSettings]
- INI Section:
/Script/UnrealEd.ContentBrowserSettings
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/ContentBrowser/Private/NewAssetOrClassContextMenu.cpp:64
Scope (from outer to inner):
file
function void FNewAssetOrClassContextMenu::MakeContextMenu
Source code excerpt:
}
bool bDisplayFolders = GetDefault<UContentBrowserSettings>()->DisplayFolders;
// check to see if we have an instance config that overrides the default in UContentBrowserSettings
if (AddNewMenuContext && AddNewMenuContext->OwningInstanceConfig)
{
bDisplayFolders = AddNewMenuContext->OwningInstanceConfig->bShowFolders;
}
#Loc: <Workspace>/Engine/Source/Editor/ContentBrowser/Private/SAssetView.cpp:2968
Scope (from outer to inner):
file
function void SAssetView::ToggleShowFolders
Source code excerpt:
check(IsToggleShowFoldersAllowed());
bool bNewState = !GetDefault<UContentBrowserSettings>()->DisplayFolders;
if (FContentBrowserInstanceConfig* Config = GetContentBrowserConfig())
{
bNewState = !Config->bShowFolders;
Config->bShowFolders = bNewState;
UContentBrowserConfig::Get()->SaveEditorConfig();
}
GetMutableDefault<UContentBrowserSettings>()->DisplayFolders = bNewState;
GetMutableDefault<UContentBrowserSettings>()->PostEditChange();
}
bool SAssetView::IsToggleShowFoldersAllowed() const
{
return bCanShowFolders;
#Loc: <Workspace>/Engine/Source/Editor/ContentBrowser/Private/SAssetView.cpp:2998
Scope (from outer to inner):
file
function bool SAssetView::IsShowingFolders
Source code excerpt:
}
return GetDefault<UContentBrowserSettings>()->DisplayFolders;
}
bool SAssetView::IsShowingReadOnlyFolders() const
{
return bCanShowReadOnlyFolders;
}
#Loc: <Workspace>/Engine/Source/Editor/ContentBrowser/Private/SAssetView.cpp:4550
Scope (from outer to inner):
file
function void SAssetView::HandleSettingChanged
Source code excerpt:
void SAssetView::HandleSettingChanged(FName PropertyName)
{
if ((PropertyName == GET_MEMBER_NAME_CHECKED(UContentBrowserSettings, DisplayFolders)) ||
(PropertyName == GET_MEMBER_NAME_CHECKED(UContentBrowserSettings, DisplayEmptyFolders)) ||
(PropertyName == "DisplayDevelopersFolder") ||
(PropertyName == "DisplayEngineFolder") ||
(PropertyName == GET_MEMBER_NAME_CHECKED(UContentBrowserSettings, bDisplayContentFolderSuffix)) ||
(PropertyName == GET_MEMBER_NAME_CHECKED(UContentBrowserSettings, bDisplayFriendlyNameForPluginFolders)) ||
(PropertyName == NAME_None)) // @todo: Needed if PostEditChange was called manually, for now
#Loc: <Workspace>/Engine/Source/Editor/ContentBrowser/Private/SContentBrowser.cpp:4482
Scope (from outer to inner):
file
function FContentBrowserInstanceConfig* SContentBrowser::CreateEditorConfigIfRequired
Source code excerpt:
InstanceConfig->bShowLocalizedContent = Settings->GetDisplayL10NFolder();
InstanceConfig->bShowPluginContent = Settings->GetDisplayPluginFolders();
InstanceConfig->bShowFolders = Settings->DisplayFolders;
InstanceConfig->bShowEmptyFolders = Settings->DisplayEmptyFolders;
InstanceConfig->bShowCppFolders = Settings->GetDisplayCppFolders();
InstanceConfig->bCollectionsDocked = Settings->GetDockCollections();
InstanceConfig->bFavoritesExpanded = Settings->GetDisplayFavorites();
InstanceConfig->bSearchAssetPaths = Settings->GetIncludeAssetPaths();
InstanceConfig->bSearchClasses = Settings->GetIncludeClassNames();
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/ContentBrowserSettings.h:31
Scope (from outer to inner):
file
class class UContentBrowserSettings : public UObject
Source code excerpt:
/** Whether to display folders in the asset view of the content browser. Note that this implies 'Show Only Assets in Selected Folders'. */
UPROPERTY(config)
bool DisplayFolders;
/** Whether to empty display folders in the asset view of the content browser. */
UPROPERTY(config)
bool DisplayEmptyFolders;
/** Whether to filter recursively when a filter is applied in the asset view of the content browser. */