ShowFlag.SelectionOutlineColor0

ShowFlag.SelectionOutlineColor0

#Overview

name: ShowFlag.SelectionOutlineColor0

This variable is created as a Console Variable (cvar).

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of ShowFlag.SelectionOutlineColor0 is to control the visibility of a specific color for selection outlines in the Unreal Engine editor. It is part of the rendering system, specifically for editor visualization.

This setting variable is primarily used in the editor’s viewport rendering system. It is referenced in the SourceControlViewport module, which suggests it may be used in conjunction with source control visualization features.

The value of this variable is set through the engine’s show flags system. It can be toggled on or off using the SetOutlineSetting function in the SourceControlViewportUtils namespace.

ShowFlag.SelectionOutlineColor0 interacts with other similar variables (SelectionOutlineColor1, SelectionOutlineColor2, etc.) to provide multiple color options for selection outlines. These variables are part of a set of six outline color options (0 through 5).

Developers should be aware that this variable is only available in the editor and is not accessible in shipping builds. This is evident from the SHOWFLAG_FIXED_IN_SHIPPING macro used in its declaration.

Best practices when using this variable include:

  1. Only use it for editor-specific visualization features.
  2. Consider all six color options when implementing selection outline functionality.
  3. Ensure that toggling this flag is properly synchronized with the actual rendering of the selection outlines.

The associated variable SelectionOutlineColor0 is essentially the same as ShowFlag.SelectionOutlineColor0. It is used in the same context and serves the same purpose. The difference is mainly in how it’s accessed:

Both variables represent the same setting and are used interchangeably depending on the context of the code. The same considerations and best practices apply to both.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:139

Scope: file

Source code excerpt:

SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutline, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineSF", "Selection Outline"))
/** 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 */

#Associated Variable and Callsites

This variable is associated with another variable named SelectionOutlineColor0. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Developer/SourceControlViewport/Private/SourceControlViewportUtils.cpp:58

Scope (from outer to inner):

file
namespace    SourceControlViewportUtils
function     bool GetOutlineSetting

Source code excerpt:

	{
	case 0:
		return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor0;
	case 1:
		return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor1;
	case 2:
		return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor2;
	case 3:
		return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor3;

#Loc: <Workspace>/Engine/Source/Developer/SourceControlViewport/Private/SourceControlViewportUtils.cpp:83

Scope (from outer to inner):

file
namespace    SourceControlViewportUtils
function     void SetOutlineSetting

Source code excerpt:

	{
	case 0:
		ViewportClient->GetEngineShowFlags()->SelectionOutlineColor0 = bEnabled;
		break;
	case 1:
		ViewportClient->GetEngineShowFlags()->SelectionOutlineColor1 = bEnabled;
		break;
	case 2:
		ViewportClient->GetEngineShowFlags()->SelectionOutlineColor2 = bEnabled;

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:139

Scope: file

Source code excerpt:

SHOWFLAG_FIXED_IN_SHIPPING(0, SelectionOutline, SFG_Hidden, NSLOCTEXT("UnrealEd", "SelectionOutlineSF", "Selection Outline"))
/** 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 */