ShowFlag.SelectionOutlineColor3

ShowFlag.SelectionOutlineColor3

#Overview

name: ShowFlag.SelectionOutlineColor3

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.SelectionOutlineColor3 is to control the visibility of the third 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 Unreal Engine’s editor viewport system, specifically in the SourceControlViewport module. It’s one of several similar flags (SelectionOutlineColor1 through SelectionOutlineColor5) that allow for multiple selection outline colors.

The value of this variable is set through the engine’s show flags system. It can be accessed and modified via the ViewportClient’s GetEngineShowFlags() method. The SourceControlViewportUtils namespace provides utility functions GetOutlineSetting and SetOutlineSetting to interact with this flag.

SelectionOutlineColor3 interacts closely with the other SelectionOutlineColor flags (1, 2, 4, and 5). They are all defined together and used in a similar manner, suggesting they work as a set to provide multiple selection outline colors.

Developers should be aware that this flag is marked as SHOWFLAG_FIXED_IN_SHIPPING(0), which means it’s set to 0 (disabled) in shipping builds and cannot be changed at runtime in those builds. It’s also categorized as SFG_Hidden, indicating it’s not meant to be directly exposed to end-users.

Best practices when using this variable include:

  1. Only use it in editor-time code, not in runtime game code.
  2. Consider the entire set of SelectionOutlineColor flags when making changes.
  3. Be aware that changes to this flag won’t affect shipping builds.

The associated variable SelectionOutlineColor3 is actually the same variable. The “ShowFlag.” prefix in the original name is likely a namespace or struct qualifier. The usage and considerations for SelectionOutlineColor3 are identical to those described above for ShowFlag.SelectionOutlineColor3.

#References in C++ code

#Callsites

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

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

Scope: file

Source code excerpt:

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"))
SHOWFLAG_ALWAYS_ACCESSIBLE(LumenReflections, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "LumenReflectionsSF", "Lumen Reflections"))
/** If Screen space contact shadows are enabled. */

#Associated Variable and Callsites

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

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

Scope (from outer to inner):

file
namespace    SourceControlViewportUtils
function     bool GetOutlineSetting

Source code excerpt:

		return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor2;
	case 3:
		return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor3;
	case 4:
		return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor4;
	case 5:
		return ViewportClient->GetEngineShowFlags()->SelectionOutlineColor5;
	default:
		ensure(false);

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

Scope (from outer to inner):

file
namespace    SourceControlViewportUtils
function     void SetOutlineSetting

Source code excerpt:

		break;
	case 3:
		ViewportClient->GetEngineShowFlags()->SelectionOutlineColor3 = bEnabled;
		break;
	case 4:
		ViewportClient->GetEngineShowFlags()->SelectionOutlineColor4 = bEnabled;
		break;
	case 5:
		ViewportClient->GetEngineShowFlags()->SelectionOutlineColor5 = bEnabled;

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

Scope: file

Source code excerpt:

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"))
SHOWFLAG_ALWAYS_ACCESSIBLE(LumenReflections, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "LumenReflectionsSF", "Lumen Reflections"))
/** If Screen space contact shadows are enabled. */