ShowFlag.SelectionOutlineColor4
ShowFlag.SelectionOutlineColor4
#Overview
name: ShowFlag.SelectionOutlineColor4
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.SelectionOutlineColor4 is to control the visibility of the fourth selection outline color in the Unreal Engine editor viewport. This setting is part of the editor’s visual feedback system for object selection.
This setting variable is primarily used by the editor’s viewport rendering system, specifically within the SourceControlViewport module. It’s one of several outline color options available for visualizing selected objects in the editor.
The value of this variable is set through the engine’s show flags system, which is typically managed by the viewport client. It can be toggled on or off programmatically using the SetOutlineSetting function in the SourceControlViewportUtils namespace.
ShowFlag.SelectionOutlineColor4 interacts with other similar variables like SelectionOutlineColor2, SelectionOutlineColor3, and SelectionOutlineColor5. These variables work together to provide multiple options for selection outline colors in the editor.
Developers should be aware that this variable is marked as SHOWFLAG_FIXED_IN_SHIPPING(0), which means it’s hidden and not available in shipping builds of the engine. It’s intended for use in the editor environment only.
Best practices when using this variable include:
- Only using it for editor-specific functionality, not for gameplay or in-game visuals.
- Considering accessibility when choosing colors, ensuring that selected objects are clearly visible against different backgrounds.
- Using it in conjunction with other selection outline colors to provide a range of visual options for users.
The associated variable SelectionOutlineColor4 is essentially the same as ShowFlag.SelectionOutlineColor4. It’s used interchangeably in the code and serves the same purpose of controlling the visibility of the fourth selection outline color. The same considerations and best practices apply to both variables.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:143
Scope: file
Source code excerpt:
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"))
SHOWFLAG_ALWAYS_ACCESSIBLE(LumenReflections, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "LumenReflectionsSF", "Lumen Reflections"))
/** If Screen space contact shadows are enabled. */
SHOWFLAG_ALWAYS_ACCESSIBLE(ContactShadows, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "ContactShadows", "Screen Space Contact Shadows"))
#Associated Variable and Callsites
This variable is associated with another variable named SelectionOutlineColor4
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Developer/SourceControlViewport/Private/SourceControlViewportUtils.cpp:66
Scope (from outer to inner):
file
namespace SourceControlViewportUtils
function bool GetOutlineSetting
Source code excerpt:
return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor3;
case 4:
return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor4;
case 5:
return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor5;
default:
ensure(false);
break;
}
#Loc: <Workspace>/Engine/Source/Developer/SourceControlViewport/Private/SourceControlViewportUtils.cpp:95
Scope (from outer to inner):
file
namespace SourceControlViewportUtils
function void SetOutlineSetting
Source code excerpt:
break;
case 4:
ViewportClient->GetEngineShowFlags()->SelectionOutlineColor4 = bEnabled;
break;
case 5:
ViewportClient->GetEngineShowFlags()->SelectionOutlineColor5 = bEnabled;
break;
default:
ensure(false);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:143
Scope: file
Source code excerpt:
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"))
SHOWFLAG_ALWAYS_ACCESSIBLE(LumenReflections, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "LumenReflectionsSF", "Lumen Reflections"))
/** If Screen space contact shadows are enabled. */
SHOWFLAG_ALWAYS_ACCESSIBLE(ContactShadows, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "ContactShadows", "Screen Space Contact Shadows"))