a.AnimNode.StrideWarping.Enable
a.AnimNode.StrideWarping.Enable
#Overview
name: a.AnimNode.StrideWarping.Enable
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Toggle Stride Warping
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.AnimNode.StrideWarping.Enable is to toggle the Stride Warping feature in Unreal Engine’s animation system. This setting variable is used to control whether the Stride Warping functionality is active or not.
This setting variable is primarily used by the Animation Warping plugin, specifically within the Stride Warping module. It’s part of the animation system in Unreal Engine 5.
The value of this variable is set as a console variable (CVar) with an initial value of 1, meaning it’s enabled by default. It can be changed at runtime through the console or programmatically.
The associated variable CVarAnimNodeStrideWarpingEnable interacts directly with this setting. It’s the C++ representation of the console variable and is used to access the current value of the setting within the code.
Developers should be aware that this variable can be used to quickly enable or disable Stride Warping for debugging or performance testing purposes. It’s particularly useful when you need to isolate issues related to Stride Warping or when you want to compare animation behavior with and without this feature.
Best practices when using this variable include:
- Use it for debugging and testing, but avoid relying on it for gameplay-critical features.
- Remember that disabling it may affect the quality of animations that depend on Stride Warping.
- Consider exposing this setting in a development build for easier testing and debugging.
Regarding the associated variable CVarAnimNodeStrideWarpingEnable:
The purpose of CVarAnimNodeStrideWarpingEnable is to provide programmatic access to the a.AnimNode.StrideWarping.Enable console variable within the C++ code.
This variable is used directly in the Animation Warping plugin, specifically in the FAnimNode_StrideWarping class.
The value of this variable is set automatically by the console variable system when a.AnimNode.StrideWarping.Enable is changed.
It interacts with the IsValidToEvaluate function of the FAnimNode_StrideWarping class, determining whether the Stride Warping node should be evaluated.
Developers should be aware that this variable is only checked in debug builds (when ENABLE_ANIM_DEBUG is defined). In release builds, this check is omitted for performance reasons.
Best practices when using this variable include:
- Use it for conditional logic in debug code or editor tools.
- Remember that checks using this variable may be stripped out in release builds.
- Consider adding similar checks in release builds if the ability to toggle Stride Warping is required in the final product.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_StrideWarping.cpp:13
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingDebug(TEXT("a.AnimNode.StrideWarping.Debug"), 0, TEXT("Turn on visualization debugging for Stride Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingVerbose(TEXT("a.AnimNode.StrideWarping.Verbose"), 0, TEXT("Turn on verbose graph debugging for Stride Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingEnable(TEXT("a.AnimNode.StrideWarping.Enable"), 1, TEXT("Toggle Stride Warping"));
#endif
void FAnimNode_StrideWarping::GatherDebugData(FNodeDebugData& DebugData)
{
FString DebugLine = DebugData.GetNodeName(this);
#if ENABLE_ANIM_DEBUG
#Associated Variable and Callsites
This variable is associated with another variable named CVarAnimNodeStrideWarpingEnable
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_StrideWarping.cpp:13
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingDebug(TEXT("a.AnimNode.StrideWarping.Debug"), 0, TEXT("Turn on visualization debugging for Stride Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingVerbose(TEXT("a.AnimNode.StrideWarping.Verbose"), 0, TEXT("Turn on verbose graph debugging for Stride Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingEnable(TEXT("a.AnimNode.StrideWarping.Enable"), 1, TEXT("Toggle Stride Warping"));
#endif
void FAnimNode_StrideWarping::GatherDebugData(FNodeDebugData& DebugData)
{
FString DebugLine = DebugData.GetNodeName(this);
#if ENABLE_ANIM_DEBUG
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_StrideWarping.cpp:385
Scope (from outer to inner):
file
function bool FAnimNode_StrideWarping::IsValidToEvaluate
Source code excerpt:
{
#if ENABLE_ANIM_DEBUG
if (CVarAnimNodeStrideWarpingEnable.GetValueOnAnyThread() == 0)
{
return false;
}
#endif
if (!PelvisBone.IsValidToEvaluate(RequiredBones))
{