a.AnimNode.OffsetRootBone.Debug
a.AnimNode.OffsetRootBone.Debug
#Overview
name: a.AnimNode.OffsetRootBone.Debug
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Turn on visualization debugging for Offset Root Bone
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.AnimNode.OffsetRootBone.Debug is to enable visualization debugging for the Offset Root Bone feature in Unreal Engine’s animation system. This setting variable is part of the animation warping system and is specifically used for debugging purposes.
This setting variable is utilized by the AnimationWarping plugin, which is part of Unreal Engine’s animation system. It’s primarily used in the AnimNode_OffsetRootBone component, which is responsible for offsetting the root bone of an animated character.
The value of this variable is set through a console command. It’s implemented as a TAutoConsoleVariable, which means it can be changed at runtime through the console or configuration files.
There are two other related variables that interact with it:
- CVarAnimNodeOffsetRootBoneEnable: Toggles the Offset Root Bone feature on/off.
- CVarAnimNodeOffsetRootBoneModifyBone: Toggles whether the transform is applied to the bone.
Developers must be aware that this variable is only available when ENABLE_ANIM_DEBUG is defined. It’s primarily intended for debugging and visualization purposes, not for production use.
Best practices when using this variable include:
- Only enable it when actively debugging animation issues related to root bone offsetting.
- Be aware that enabling debug visualization may impact performance, so it should be used judiciously.
- Use it in conjunction with the other related variables for a comprehensive understanding of the Offset Root Bone feature.
Regarding the associated variable CVarAnimNodeOffsetRootBoneDebug:
The purpose of CVarAnimNodeOffsetRootBoneDebug is identical to a.AnimNode.OffsetRootBone.Debug. It’s the C++ implementation of the console variable.
This variable is used directly in the AnimationWarping plugin’s implementation, specifically in the FAnimNode_OffsetRootBone::Evaluate_AnyThread function.
The value of this variable is checked during the evaluation of the animation node. When set to 1, it enables debugging visualizations.
Developers should be aware that this variable is checked on any thread, as indicated by the GetValueOnAnyThread() call. This means the debugging can be toggled at runtime without requiring a specific thread context.
Best practices for using CVarAnimNodeOffsetRootBoneDebug include:
- Use it for temporary debugging only, not as a permanent solution.
- Be cautious about performance implications when enabling it in a shipping build.
- Consider wrapping debug code in #if ENABLE_ANIM_DEBUG … #endif blocks to ensure it’s not compiled in release builds.
#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_OffsetRootBone.cpp:13
Scope: file
Source code excerpt:
#if ENABLE_ANIM_DEBUG
TAutoConsoleVariable<int32> CVarAnimNodeOffsetRootBoneDebug(TEXT("a.AnimNode.OffsetRootBone.Debug"), 0, TEXT("Turn on visualization debugging for Offset Root Bone"));
TAutoConsoleVariable<int32> CVarAnimNodeOffsetRootBoneEnable(TEXT("a.AnimNode.OffsetRootBone.Enable"), 1, TEXT("Toggle Offset Root Bone"));
TAutoConsoleVariable<int32> CVarAnimNodeOffsetRootBoneModifyBone(TEXT("a.AnimNode.OffsetRootBone.ModifyBone"), 1, TEXT("Toggle whether the transform is applied to the bone"));
#endif
IMPLEMENT_ANIMGRAPH_MESSAGE(UE::AnimationWarping::FRootOffsetProvider);
#Associated Variable and Callsites
This variable is associated with another variable named CVarAnimNodeOffsetRootBoneDebug
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OffsetRootBone.cpp:13
Scope: file
Source code excerpt:
#if ENABLE_ANIM_DEBUG
TAutoConsoleVariable<int32> CVarAnimNodeOffsetRootBoneDebug(TEXT("a.AnimNode.OffsetRootBone.Debug"), 0, TEXT("Turn on visualization debugging for Offset Root Bone"));
TAutoConsoleVariable<int32> CVarAnimNodeOffsetRootBoneEnable(TEXT("a.AnimNode.OffsetRootBone.Enable"), 1, TEXT("Toggle Offset Root Bone"));
TAutoConsoleVariable<int32> CVarAnimNodeOffsetRootBoneModifyBone(TEXT("a.AnimNode.OffsetRootBone.ModifyBone"), 1, TEXT("Toggle whether the transform is applied to the bone"));
#endif
IMPLEMENT_ANIMGRAPH_MESSAGE(UE::AnimationWarping::FRootOffsetProvider);
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OffsetRootBone.cpp:372
Scope (from outer to inner):
file
function void FAnimNode_OffsetRootBone::Evaluate_AnyThread
Source code excerpt:
#if ENABLE_ANIM_DEBUG
bool bDebugging = CVarAnimNodeOffsetRootBoneDebug.GetValueOnAnyThread() == 1;
if (bDebugging)
{
const float InnerCircleRadius = 40.0f;
const float CircleThickness = 1.5f;
const float ConeThickness = 0.3f;