a.AnimNode.DeadBlending.Enable
a.AnimNode.DeadBlending.Enable
#Overview
name: a.AnimNode.DeadBlending.Enable
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable / Disable DeadBlending
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.AnimNode.DeadBlending.Enable is to control the activation of the DeadBlending feature in Unreal Engine’s animation system. This setting variable is used to enable or disable the DeadBlending functionality, which is likely related to smoothing out transitions between animation states or handling cases where an animation might abruptly end.
The Unreal Engine subsystem that relies on this setting variable is the Animation system, specifically the DeadBlending module within the Engine’s runtime. This can be inferred from the file location (Engine/Source/Runtime/Engine/Private/Animation/AnimNode_DeadBlending.cpp) and the namespace (UE::Anim) where it’s being used.
The value of this variable is set through a console variable (CVarAnimDeadBlendingEnable) using the TAutoConsoleVariable template. It’s initialized with a default value of 1, meaning the DeadBlending feature is enabled by default.
The associated variable CVarAnimDeadBlendingEnable interacts directly with a.AnimNode.DeadBlending.Enable. They share the same value and purpose, with CVarAnimDeadBlendingEnable being the actual C++ variable that controls the behavior in the code.
Developers must be aware that changing this variable will affect the behavior of the animation system, particularly in how it handles blending and transitions. Disabling this feature (by setting it to 0) will cause the system to clear any pending inertialization requests and deactivate the inertialization state, as seen in the Evaluate_AnyThread function.
Best practices when using this variable include:
- Only disable it for testing or debugging purposes, as it’s enabled by default for a reason.
- Be cautious when disabling it in a production environment, as it may affect the smoothness of animations.
- If you need to modify this setting at runtime, use the console variable system rather than trying to modify the underlying variable directly.
Regarding the associated variable CVarAnimDeadBlendingEnable:
- It’s a console variable that directly controls the DeadBlending feature.
- It’s defined using TAutoConsoleVariable, which allows it to be changed at runtime through console commands.
- The variable is of type int32, suggesting it could potentially support more states than just on/off in the future.
- It’s accessed using GetValueOnAnyThread(), indicating that it’s designed to be thread-safe for use in multithreaded animation calculations.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Animation/AnimNode_DeadBlending.cpp:16
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "AnimNode_DeadBlending"
TAutoConsoleVariable<int32> CVarAnimDeadBlendingEnable(TEXT("a.AnimNode.DeadBlending.Enable"), 1, TEXT("Enable / Disable DeadBlending"));
namespace UE::Anim
{
// Inertialization request event bound to a node
class FDeadBlendingRequester : public IInertializationRequester
{
#Associated Variable and Callsites
This variable is associated with another variable named CVarAnimDeadBlendingEnable
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Animation/AnimNode_DeadBlending.cpp:16
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "AnimNode_DeadBlending"
TAutoConsoleVariable<int32> CVarAnimDeadBlendingEnable(TEXT("a.AnimNode.DeadBlending.Enable"), 1, TEXT("Enable / Disable DeadBlending"));
namespace UE::Anim
{
// Inertialization request event bound to a node
class FDeadBlendingRequester : public IInertializationRequester
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Animation/AnimNode_DeadBlending.cpp:766
Scope (from outer to inner):
file
function void FAnimNode_DeadBlending::Evaluate_AnyThread
Source code excerpt:
// Disable inertialization if requested (for testing / debugging)
if (!CVarAnimDeadBlendingEnable.GetValueOnAnyThread())
{
// Clear any pending inertialization requests
RequestQueue.Reset();
// Clear the inertialization state
Deactivate();