ControlRig.DisableExecutionInAnimNode
ControlRig.DisableExecutionInAnimNode
#Overview
name: ControlRig.DisableExecutionInAnimNode
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
if nonzero we disable the execution of Control Rigs inside an anim node.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ControlRig.DisableExecutionInAnimNode is to provide a way to disable the execution of Control Rigs inside an animation node. This setting is primarily used for debugging and performance testing in the animation system of Unreal Engine.
This setting variable is used in the Animation module, specifically within the Control Rig plugin. Based on the callsites, it’s clear that the ControlRig subsystem relies on this variable to determine whether to execute Control Rigs within animation nodes.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 0, meaning Control Rig execution is enabled by default.
The associated variable CVarControlRigDisableExecutionAnimNode interacts directly with ControlRig.DisableExecutionInAnimNode. They share the same value and purpose.
Developers must be aware that:
- Setting this variable to a non-zero value will disable Control Rig execution in animation nodes across the entire engine.
- This is a global setting that affects all Control Rigs in animation nodes, not just specific instances.
- Disabling Control Rig execution can significantly alter animation behavior and should be used cautiously.
Best practices when using this variable include:
- Use it primarily for debugging and performance testing purposes.
- Always reset it to 0 after testing to ensure normal Control Rig functionality.
- Document any use of this variable in project settings or documentation to avoid unexpected behavior.
- Consider using it in conjunction with profiling tools to measure the performance impact of Control Rigs in animation nodes.
Regarding the associated variable CVarControlRigDisableExecutionAnimNode:
- It’s an instance of TAutoConsoleVariable
, which is Unreal Engine’s way of creating console variables. - It’s used in the CanExecute() function of FAnimNode_ControlRigBase to determine if the Control Rig should be executed.
- When using this variable in code, developers should use the GetInt() method to retrieve its current value.
- Changes to this variable will take effect immediately, potentially during runtime, so it should be handled with care in production environments.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRig/Private/AnimNode_ControlRigBase.cpp:26
Scope: file
Source code excerpt:
// CVar to disable control rig execution within an anim node
static TAutoConsoleVariable<int32> CVarControlRigDisableExecutionAnimNode(TEXT("ControlRig.DisableExecutionInAnimNode"), 0, TEXT("if nonzero we disable the execution of Control Rigs inside an anim node."));
FAnimNode_ControlRigBase::FAnimNode_ControlRigBase()
: FAnimNode_CustomProperty()
, bResetInputPoseToInitial(true)
, bTransferInputPose(true)
, bTransferInputCurves(true)
#Associated Variable and Callsites
This variable is associated with another variable named CVarControlRigDisableExecutionAnimNode
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRig/Private/AnimNode_ControlRigBase.cpp:26
Scope: file
Source code excerpt:
// CVar to disable control rig execution within an anim node
static TAutoConsoleVariable<int32> CVarControlRigDisableExecutionAnimNode(TEXT("ControlRig.DisableExecutionInAnimNode"), 0, TEXT("if nonzero we disable the execution of Control Rigs inside an anim node."));
FAnimNode_ControlRigBase::FAnimNode_ControlRigBase()
: FAnimNode_CustomProperty()
, bResetInputPoseToInitial(true)
, bTransferInputPose(true)
, bTransferInputCurves(true)
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRig/Private/AnimNode_ControlRigBase.cpp:105
Scope (from outer to inner):
file
function bool FAnimNode_ControlRigBase::CanExecute
Source code excerpt:
bool FAnimNode_ControlRigBase::CanExecute()
{
if(CVarControlRigDisableExecutionAnimNode->GetInt() != 0)
{
return false;
}
if (UControlRig* ControlRig = GetControlRig())
{