ControlRig.CreateFloatControlsForCurves
ControlRig.CreateFloatControlsForCurves
#Overview
name: ControlRig.CreateFloatControlsForCurves
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If nonzero we create a float control for each curve in the curve container, useful for debugging low level controls.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ControlRig.CreateFloatControlsForCurves is to enable the creation of float controls for each curve in the curve container within the Control Rig system. This setting is primarily used for debugging purposes in the animation system of Unreal Engine 5.
This setting variable is primarily used in the Control Rig plugin, which is part of Unreal Engine’s animation system. Specifically, it’s referenced in the UControlRig class, which is a core component of the Control Rig system.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 0, meaning the feature is disabled by default. Developers can change this value at runtime using console commands or through project settings.
The associated variable CVarControlRigCreateFloatControlsForCurves directly interacts with this setting. It’s an instance of TAutoConsoleVariable
Developers should be aware that enabling this feature (by setting the value to non-zero) may impact performance, as it creates additional controls for debugging purposes. It should primarily be used during development and debugging phases, not in production builds.
Best practices for using this variable include:
- Only enable it when necessary for debugging curve-related issues in the Control Rig system.
- Ensure it’s disabled in production builds to avoid unnecessary performance overhead.
- Use it in conjunction with other debugging tools to get a comprehensive view of the Control Rig’s behavior.
Regarding the associated variable CVarControlRigCreateFloatControlsForCurves:
This is the actual console variable that stores and manages the value of the ControlRig.CreateFloatControlsForCurves setting. It’s defined as a static TAutoConsoleVariable
The variable is used in the UControlRig::CreateRigControlsForCurveContainer() function to determine whether float controls should be created for each curve in the curve container. The function checks the value of this variable and creates the controls if the value is non-zero.
Developers should interact with this setting primarily through the console variable system, rather than trying to modify the CVarControlRigCreateFloatControlsForCurves variable directly in code. This ensures that the setting can be easily changed at runtime without recompiling the code.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRig/Private/ControlRig.cpp:54
Scope: file
Source code excerpt:
//By default we don't but it may be useful to do so for debugging
static TAutoConsoleVariable<int32> CVarControlRigCreateFloatControlsForCurves(
TEXT("ControlRig.CreateFloatControlsForCurves"),
0,
TEXT("If nonzero we create a float control for each curve in the curve container, useful for debugging low level controls."),
ECVF_Default);
//CVar to specify if we should allow debug drawing in game (during shipped game or PIE)
//By default we don't for performance
#Associated Variable and Callsites
This variable is associated with another variable named CVarControlRigCreateFloatControlsForCurves
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRig/Private/ControlRig.cpp:53
Scope: file
Source code excerpt:
//CVar to specify if we should create a float control for each curve in the curve container
//By default we don't but it may be useful to do so for debugging
static TAutoConsoleVariable<int32> CVarControlRigCreateFloatControlsForCurves(
TEXT("ControlRig.CreateFloatControlsForCurves"),
0,
TEXT("If nonzero we create a float control for each curve in the curve container, useful for debugging low level controls."),
ECVF_Default);
//CVar to specify if we should allow debug drawing in game (during shipped game or PIE)
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRig/Private/ControlRig.cpp:1919
Scope (from outer to inner):
file
function void UControlRig::CreateRigControlsForCurveContainer
Source code excerpt:
void UControlRig::CreateRigControlsForCurveContainer()
{
const bool bCreateFloatControls = CVarControlRigCreateFloatControlsForCurves->GetInt() == 0 ? false : true;
if(bCreateFloatControls && DynamicHierarchy)
{
URigHierarchyController* Controller = DynamicHierarchy->GetController(true);
if(Controller == nullptr)
{
return;