ControlRig.Test.EnableTestingToolbar
ControlRig.Test.EnableTestingToolbar
#Overview
name: ControlRig.Test.EnableTestingToolbar
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When true we\'ll show the testing toolbar in Control Rig Editor.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ControlRig.Test.EnableTestingToolbar is to control the visibility of a testing toolbar within the Control Rig Editor in Unreal Engine 5. This setting is primarily used for debugging and development purposes in the animation system, specifically for the Control Rig feature.
The Unreal Engine subsystem that relies on this setting variable is the Control Rig Editor, which is part of the Animation module. It’s specifically used in the ControlRigEditor plugin.
The value of this variable is set as a console variable (CVar) with a default value of false. It can be changed at runtime through the console or configuration files.
This variable interacts directly with its associated variable CVarControlRigShowTestingToolbar. They share the same value and purpose.
Developers must be aware that this variable is intended for testing and debugging purposes. Enabling it will show additional tools in the Control Rig Editor interface, which may not be necessary or desirable in a production environment.
Best practices when using this variable include:
- Only enable it when actively debugging or testing Control Rig features.
- Ensure it’s disabled in production builds or when packaging the game.
- Use it in conjunction with other debugging tools and logs for comprehensive testing.
Regarding the associated variable CVarControlRigShowTestingToolbar:
This is the actual C++ variable that controls the behavior. It’s defined as a TAutoConsoleVariable
The variable is checked in the FControlRigEditor::FillToolbar function to determine whether to add the testing toolbar to the Control Rig Editor interface.
Developers should use this variable when they need programmatic access to the testing toolbar state within C++ code. For example, they might want to conditionally execute certain code paths based on whether the testing toolbar is enabled.
When working with CVarControlRigShowTestingToolbar, developers should:
- Be aware that changes to this variable will immediately affect the editor UI.
- Consider performance implications if checking this variable frequently in performance-critical code paths.
- Use the GetValueOnAnyThread() method to safely access the value from any thread.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRigEditor/Private/Editor/ControlRigEditor.cpp:114
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "ControlRigEditor"
TAutoConsoleVariable<bool> CVarControlRigShowTestingToolbar(TEXT("ControlRig.Test.EnableTestingToolbar"), false, TEXT("When true we'll show the testing toolbar in Control Rig Editor."));
TAutoConsoleVariable<bool> CVarShowSchematicPanelOverlay(TEXT("ControlRig.Preview.ShowSchematicPanelOverlay"), true, TEXT("When true we'll add an overlay to the persona viewport to show modular rig information."));
const FName FControlRigEditorModes::ControlRigEditorMode = TEXT("Rigging");
const TArray<FName> FControlRigEditor::ForwardsSolveEventQueue = {FRigUnit_BeginExecution::EventName};
const TArray<FName> FControlRigEditor::BackwardsSolveEventQueue = {FRigUnit_InverseExecution::EventName};
const TArray<FName> FControlRigEditor::ConstructionEventQueue = {FRigUnit_PrepareForExecution::EventName};
#Associated Variable and Callsites
This variable is associated with another variable named CVarControlRigShowTestingToolbar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRigEditor/Private/Editor/ControlRigEditor.cpp:114
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "ControlRigEditor"
TAutoConsoleVariable<bool> CVarControlRigShowTestingToolbar(TEXT("ControlRig.Test.EnableTestingToolbar"), false, TEXT("When true we'll show the testing toolbar in Control Rig Editor."));
TAutoConsoleVariable<bool> CVarShowSchematicPanelOverlay(TEXT("ControlRig.Preview.ShowSchematicPanelOverlay"), true, TEXT("When true we'll add an overlay to the persona viewport to show modular rig information."));
const FName FControlRigEditorModes::ControlRigEditorMode = TEXT("Rigging");
const TArray<FName> FControlRigEditor::ForwardsSolveEventQueue = {FRigUnit_BeginExecution::EventName};
const TArray<FName> FControlRigEditor::BackwardsSolveEventQueue = {FRigUnit_InverseExecution::EventName};
const TArray<FName> FControlRigEditor::ConstructionEventQueue = {FRigUnit_PrepareForExecution::EventName};
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRigEditor/Private/Editor/ControlRigEditor.cpp:755
Scope (from outer to inner):
file
function void FControlRigEditor::FillToolbar
Source code excerpt:
}
if(CVarControlRigShowTestingToolbar.GetValueOnAnyThread())
{
ToolbarBuilder.AddSeparator();
FUIAction TestAssetAction;
ToolbarBuilder.AddComboButton(
FUIAction(FExecuteAction(), FCanExecuteAction::CreateLambda([this]()