ShowFlag.SelectionOutlineColor1
ShowFlag.SelectionOutlineColor1
#Overview
name: ShowFlag.SelectionOutlineColor1
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allows to override a specific showflag (works in editor and game, \
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.SelectionOutlineColor1 is to control the visibility of a specific selection outline color in the Unreal Engine editor. It is part of a set of show flags used for customizing the appearance of selected objects in the viewport.
This setting variable is primarily used by the Unreal Engine’s editor subsystem, specifically in the viewport rendering and selection visualization. Based on the callsites, it’s evident that this variable is utilized in the SourceControlViewport module, which suggests it may have a role in visualizing source control status in the editor viewport.
The value of this variable is set through the engine’s show flags system. It can be toggled on or off programmatically, as seen in the SetOutlineSetting function in the SourceControlViewportUtils namespace.
ShowFlag.SelectionOutlineColor1 interacts with other similar variables (SelectionOutlineColor0 through SelectionOutlineColor5) to provide a range of outline colors for different selection states or categories.
Developers should be aware that this variable is fixed in shipping builds (SHOWFLAG_FIXED_IN_SHIPPING), meaning it’s only relevant for editor and development builds. It’s also marked as hidden (SFG_Hidden), suggesting it’s not meant to be directly manipulated by end-users.
Best practices when using this variable include:
- Using it in conjunction with other SelectionOutlineColor flags to create a consistent selection visualization scheme.
- Being mindful of its editor-only nature and not relying on it for gameplay or in-game visuals.
- Considering accessibility when choosing colors, ensuring good contrast and visibility.
Regarding the associated variable SelectionOutlineColor1, it serves the same purpose as ShowFlag.SelectionOutlineColor1. It’s used in the same context within the SourceControlViewport module to get and set the state of the outline color. The main difference is in how it’s accessed: ShowFlag.SelectionOutlineColor1 is accessed through the engine’s show flags system, while SelectionOutlineColor1 is accessed directly as a member of the ViewportClient’s EngineShowFlags. They represent the same setting but are accessed through different interfaces, likely for convenience in different parts of the engine code.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:140
Scope: file
Source code excerpt:
/** Outline custom colors in the editor */
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor0, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor0", "Selection Outline Color 0"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor1, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor1", "Selection Outline Color 1"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor2, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor2", "Selection Outline Color 2"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor3, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor3", "Selection Outline Color 3"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor4, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor4", "Selection Outline Color 4"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor5, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor5", "Selection Outline Color 5"))
/** If screen space reflections are enabled, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(ScreenSpaceReflections, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "ScreenSpaceReflectionsSF", "Screen Space Reflections"))
#Associated Variable and Callsites
This variable is associated with another variable named SelectionOutlineColor1
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Developer/SourceControlViewport/Private/SourceControlViewportUtils.cpp:60
Scope (from outer to inner):
file
namespace SourceControlViewportUtils
function bool GetOutlineSetting
Source code excerpt:
return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor0;
case 1:
return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor1;
case 2:
return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor2;
case 3:
return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor3;
case 4:
return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor4;
#Loc: <Workspace>/Engine/Source/Developer/SourceControlViewport/Private/SourceControlViewportUtils.cpp:86
Scope (from outer to inner):
file
namespace SourceControlViewportUtils
function void SetOutlineSetting
Source code excerpt:
break;
case 1:
ViewportClient->GetEngineShowFlags()->SelectionOutlineColor1 = bEnabled;
break;
case 2:
ViewportClient->GetEngineShowFlags()->SelectionOutlineColor2 = bEnabled;
break;
case 3:
ViewportClient->GetEngineShowFlags()->SelectionOutlineColor3 = bEnabled;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:140
Scope: file
Source code excerpt:
/** Outline custom colors in the editor */
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor0, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor0", "Selection Outline Color 0"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor1, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor1", "Selection Outline Color 1"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor2, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor2", "Selection Outline Color 2"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor3, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor3", "Selection Outline Color 3"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor4, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor4", "Selection Outline Color 4"))
SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutlineColor5, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineColor5", "Selection Outline Color 5"))
/** If screen space reflections are enabled, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(ScreenSpaceReflections, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "ScreenSpaceReflectionsSF", "Screen Space Reflections"))