a.AnimNode.OffsetRootBone.ModifyBone
a.AnimNode.OffsetRootBone.ModifyBone
#Overview
name: a.AnimNode.OffsetRootBone.ModifyBone
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Toggle whether the transform is applied to the bone
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.AnimNode.OffsetRootBone.ModifyBone is to toggle whether the transform is applied to the bone in the Offset Root Bone animation node. This setting variable is part of the animation system in Unreal Engine 5, specifically related to the Animation Warping plugin.
This setting variable is primarily used in the Animation Warping plugin, which is part of Unreal Engine’s animation system. Based on the callsites, it’s implemented in the AnimNode_OffsetRootBone.cpp file, which suggests it’s specifically tied to the OffsetRootBone animation node.
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 modified at runtime through the console or programmatically.
This variable interacts closely with other related console variables, specifically:
- CVarAnimNodeOffsetRootBoneDebug - for visualization debugging
- CVarAnimNodeOffsetRootBoneEnable - to toggle the Offset Root Bone functionality
The associated variable CVarAnimNodeOffsetRootBoneModifyBone is the actual console variable that stores and controls this setting.
Developers should be aware that:
- This variable is only checked when ENABLE_ANIM_DEBUG is defined, suggesting it’s primarily for debugging purposes.
- When disabled (set to 0), the bone transform modification will be skipped, which could significantly alter the animation behavior.
Best practices when using this variable include:
- Use it primarily for debugging and testing purposes.
- Be cautious when disabling it in a production environment, as it may lead to unexpected animation results.
- Consider using it in conjunction with the other related debug variables for a comprehensive understanding of the Offset Root Bone behavior.
Regarding the associated variable CVarAnimNodeOffsetRootBoneModifyBone:
- It’s the actual console variable that controls the behavior described above.
- It’s defined as an integer console variable, allowing for potential future expansion of functionality beyond just on/off.
- Its value is checked in the FAnimNode_OffsetRootBone::Evaluate_AnyThread function, which is likely the core evaluation function for this animation node.
- When using this variable, developers should be aware that changes will affect the runtime behavior of the Offset Root Bone animation node, potentially impacting all animations using this node.
#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:15
Scope: file
Source code excerpt:
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);
namespace UE::Anim::OffsetRootBone
{
#Associated Variable and Callsites
This variable is associated with another variable named CVarAnimNodeOffsetRootBoneModifyBone
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OffsetRootBone.cpp:15
Scope: file
Source code excerpt:
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);
namespace UE::Anim::OffsetRootBone
{
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OffsetRootBone.cpp:218
Scope (from outer to inner):
file
function void FAnimNode_OffsetRootBone::Evaluate_AnyThread
Source code excerpt:
bool bModifyBone = true;
#if ENABLE_ANIM_DEBUG
bModifyBone = CVarAnimNodeOffsetRootBoneModifyBone.GetValueOnAnyThread() == 1;
#endif
if (GetTranslationMode() == EOffsetRootBoneMode::Release ||
GetTranslationMode() == EOffsetRootBoneMode::Interpolate)
{
FVector TranslationOffset = ComponentTransform.GetLocation() - SimulatedTranslation;