SourceControl.Revert.EnableFromSceneOutliner

SourceControl.Revert.EnableFromSceneOutliner

#Overview

name: SourceControl.Revert.EnableFromSceneOutliner

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 SourceControl.Revert.EnableFromSceneOutliner is to control whether the Source Control ‘Revert’ operation can be triggered from the Scene Outliner in Unreal Engine 5.

This setting variable is primarily used by the Source Control system and the Scene Outliner module in Unreal Engine 5. It allows developers to enable or disable the ability to perform source control revert operations directly from the Scene Outliner interface.

The value of this variable is set as a console variable using the TAutoConsoleVariable class. It is initialized to false by default, meaning the revert operation from Scene Outliner is disabled unless explicitly enabled.

The associated variable CVarSourceControlEnableRevertFromSceneOutliner directly interacts with SourceControl.Revert.EnableFromSceneOutliner. They share the same value and purpose.

Developers must be aware that this variable affects the user interface and functionality of the Scene Outliner. When enabled, it adds an additional source control operation that users can perform directly from the Scene Outliner, which may impact workflow and user experience.

Best practices when using this variable include:

  1. Only enable it if there’s a specific need for reverting files directly from the Scene Outliner.
  2. Ensure that the development team is aware of this feature when enabled, as it may affect collaborative workflows.
  3. Consider the potential risks of allowing revert operations from multiple locations in the editor.

Regarding the associated variable CVarSourceControlEnableRevertFromSceneOutliner:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Developer/SourceControl/Private/SourceControlCVars.cpp:5

Scope (from outer to inner):

file
namespace    SourceControlCVars

Source code excerpt:

{
	TAutoConsoleVariable<bool> CVarSourceControlEnableRevertFromSceneOutliner(
		TEXT("SourceControl.Revert.EnableFromSceneOutliner"),
		false,
		TEXT("Allows a SourceControl 'Revert' operation to be triggered from the SceneOutliner."),
		ECVF_Default);

	TAutoConsoleVariable<bool> CVarSourceControlEnableRevertFromSubmitWidget(
		TEXT("SourceControl.Revert.EnableFromSubmitWidget"),

#Loc: <Workspace>/Engine/Source/Editor/SceneOutliner/Private/SceneOutlinerSCCHandler.cpp:95

Scope (from outer to inner):

file
function     bool FSceneOutlinerSCCHandler::AllowExecuteSourceControlRevert

Source code excerpt:

bool FSceneOutlinerSCCHandler::AllowExecuteSourceControlRevert() const
{
	if (IConsoleVariable* CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("SourceControl.Revert.EnableFromSceneOutliner")))
	{
		return CVar->GetBool();
	}
	else
	{
		return false;

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Developer/SourceControl/Private/SourceControlCVars.cpp:4

Scope (from outer to inner):

file
namespace    SourceControlCVars

Source code excerpt:

namespace SourceControlCVars
{
	TAutoConsoleVariable<bool> CVarSourceControlEnableRevertFromSceneOutliner(
		TEXT("SourceControl.Revert.EnableFromSceneOutliner"),
		false,
		TEXT("Allows a SourceControl 'Revert' operation to be triggered from the SceneOutliner."),
		ECVF_Default);

	TAutoConsoleVariable<bool> CVarSourceControlEnableRevertFromSubmitWidget(

#Loc: <Workspace>/Engine/Source/Developer/SourceControl/Private/SourceControlCVars.h:7

Scope (from outer to inner):

file
namespace    SourceControlCVars

Source code excerpt:

namespace SourceControlCVars
{
	extern TAutoConsoleVariable<bool> CVarSourceControlEnableRevertFromSceneOutliner;
	extern TAutoConsoleVariable<bool> CVarSourceControlEnableRevertFromSubmitWidget;
	extern TAutoConsoleVariable<bool> CVarSourceControlEnableRevertUnsaved;
	extern TAutoConsoleVariable<bool> CVarSourceControlEnableLoginDialogModal;
}