bShowOnlyActorsInCurrentLevel
bShowOnlyActorsInCurrentLevel
#Overview
name: bShowOnlyActorsInCurrentLevel
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 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bShowOnlyActorsInCurrentLevel is to control the visibility of actors in the Scene Outliner, specifically to show only actors that exist in the current level of the game or editor scene.
This setting variable is primarily used in the Scene Outliner and Object Mixer subsystems of Unreal Engine’s editor. It’s part of the filtering mechanism for these tools, which are used for managing and organizing actors in the scene.
The value of this variable is set in two places:
- In the ObjectMixerOutlinerMode class (ObjectMixer plugin)
- In the ActorBrowsingMode class (SceneOutliner module)
Both classes have similar logic for setting this variable. When a user toggles the “Only in Current Level” filter in the UI, a lambda function is called that updates the value of bShowOnlyActorsInCurrentLevel and saves the configuration.
This variable interacts with other filtering mechanisms in the Scene Outliner and Object Mixer. It’s part of a larger set of filter options that can be combined to refine what’s displayed in these tools.
Developers should be aware that:
- This variable affects the visibility of actors in the Scene Outliner and Object Mixer, not in the actual game runtime.
- It’s a user preference that persists between editor sessions.
- It’s part of a config class (FActorBrowsingModeConfig or FObjectMixerOutlinerModeConfig) and is saved when changed.
Best practices when using this variable:
- Respect the user’s choice and don’t override it programmatically unless absolutely necessary.
- If you’re extending the Scene Outliner or Object Mixer functionality, consider how your changes might interact with this filter.
- When querying for actors in editor tools, check this setting to determine if you should limit your results to the current level.
- If creating new level editing tools, consider implementing similar filtering options for consistency across the editor interface.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:121, section: [/Script/SceneOutliner.ActorBrowsingModeSettings]
- INI Section:
/Script/SceneOutliner.ActorBrowsingModeSettings
- Raw value:
False
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Editor/ObjectMixer/ObjectMixer/Source/ObjectMixer/Private/Views/List/Modes/ObjectMixerOutlinerMode.cpp:282
Scope (from outer to inner):
file
function FObjectMixerOutlinerMode::FObjectMixerOutlinerMode
Source code excerpt:
LOCTEXT("ToggleShowOnlyCurrentLevel", "Only in Current Level"),
LOCTEXT("ToggleShowOnlyCurrentLevelToolTip", "When enabled, only shows Actors that are in the Current Level."),
LocalSettings.bShowOnlyActorsInCurrentLevel,
FCreateSceneOutlinerFilter::CreateStatic(&FObjectMixerOutlinerMode::CreateIsInCurrentLevelFilter)
);
OnlyCurrentLevelInfo.OnToggle().AddLambda([this](bool bIsActive)
{
FObjectMixerOutlinerModeConfig* Settings = GetMutableConfig();
if(Settings)
{
Settings->bShowOnlyActorsInCurrentLevel = bIsActive;
SaveConfig();
}
});
FilterInfoMap.Add(TEXT("ShowOnlyCurrentLevel"), OnlyCurrentLevelInfo);
FSceneOutlinerFilterInfo OnlyCurrentDataLayersInfo(
#Loc: <Workspace>/Engine/Plugins/Editor/ObjectMixer/ObjectMixer/Source/ObjectMixer/Public/Views/List/Modes/ObjectMixerOutlinerMode.h:67
Scope: file
Source code excerpt:
/** True when the Scene Outliner is showing only Actors that exist in the current level */
UPROPERTY()
bool bShowOnlyActorsInCurrentLevel = false;
/** True when the Scene Outliner is showing only Actors that exist in the current data layers */
UPROPERTY()
bool bShowOnlyActorsInCurrentDataLayers = false;
/** True when the Scene Outliner is showing only Actors that exist in the current content bundle */
#Loc: <Workspace>/Engine/Source/Editor/SceneOutliner/Private/ActorBrowsingMode.cpp:119
Scope (from outer to inner):
file
function FActorBrowsingMode::FActorBrowsingMode
Source code excerpt:
FilterInfoMap.Add(TEXT("ShowOnlySelectedActors"), ShowOnlySelectedActorsInfo);
FSceneOutlinerFilterInfo OnlyCurrentLevelInfo(LOCTEXT("ToggleShowOnlyCurrentLevel", "Only in Current Level"), LOCTEXT("ToggleShowOnlyCurrentLevelToolTip", "When enabled, only shows Actors that are in the Current Level."), LocalSettings.bShowOnlyActorsInCurrentLevel, FCreateSceneOutlinerFilter::CreateStatic(&FActorBrowsingMode::CreateIsInCurrentLevelFilter));
OnlyCurrentLevelInfo.OnToggle().AddLambda([this](bool bIsActive)
{
FActorBrowsingModeConfig* Settings = GetMutableConfig();
if(Settings)
{
Settings->bShowOnlyActorsInCurrentLevel = bIsActive;
SaveConfig();
}
});
FilterInfoMap.Add(TEXT("ShowOnlyCurrentLevel"), OnlyCurrentLevelInfo);
FSceneOutlinerFilterInfo OnlyCurrentDataLayersInfo(LOCTEXT("ToggleShowOnlyCurrentDataLayers", "Only in any Current Data Layers"), LOCTEXT("ToggleShowOnlyCurrentDataLayersToolTip", "When enabled, only shows Actors that are in any Current Data Layers."), LocalSettings.bShowOnlyActorsInCurrentDataLayers, FCreateSceneOutlinerFilter::CreateStatic(&FActorBrowsingMode::CreateIsInCurrentDataLayersFilter));
#Loc: <Workspace>/Engine/Source/Editor/SceneOutliner/Private/ActorBrowsingModeSettings.h:35
Scope: file
Source code excerpt:
/** True when the Scene Outliner is showing only Actors that exist in the current level */
UPROPERTY()
bool bShowOnlyActorsInCurrentLevel = false;
/** True when the Scene Outliner is showing only Actors that exist in the current data layers */
UPROPERTY()
bool bShowOnlyActorsInCurrentDataLayers = false;
/** True when the Scene Outliner is showing only Actors that exist in the current content bundle */