ControlRig.DisableExecutionInAnimNode

ControlRig.DisableExecutionInAnimNode

#Overview

name: ControlRig.DisableExecutionInAnimNode

This variable is created as a Console Variable (cvar).

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:

  1. Setting this variable to a non-zero value will disable Control Rig execution in animation nodes across the entire engine.
  2. This is a global setting that affects all Control Rigs in animation nodes, not just specific instances.
  3. Disabling Control Rig execution can significantly alter animation behavior and should be used cautiously.

Best practices when using this variable include:

  1. Use it primarily for debugging and performance testing purposes.
  2. Always reset it to 0 after testing to ensure normal Control Rig functionality.
  3. Document any use of this variable in project settings or documentation to avoid unexpected behavior.
  4. Consider using it in conjunction with profiling tools to measure the performance impact of Control Rigs in animation nodes.

Regarding the associated variable CVarControlRigDisableExecutionAnimNode:

#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())
	{