a.AnimNode.OffsetRootBone.Enable

a.AnimNode.OffsetRootBone.Enable

#Overview

name: a.AnimNode.OffsetRootBone.Enable

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 a.AnimNode.OffsetRootBone.Enable is to toggle the Offset Root Bone functionality in Unreal Engine’s animation system. This setting variable is used to control whether the Offset Root Bone feature is active or not during runtime.

This setting variable is primarily used in the Animation Warping plugin, specifically in the Offset Root Bone functionality. It is part of the animation system in Unreal Engine 5.

The value of this variable is set through a console variable (CVar) named CVarAnimNodeOffsetRootBoneEnable. It is initialized with a default value of 1, indicating that the Offset Root Bone feature is enabled by default.

The associated variable CVarAnimNodeOffsetRootBoneEnable directly interacts with this setting. They share the same value and purpose.

Developers must be aware that this variable is only checked when ENABLE_ANIM_DEBUG is defined. This suggests that it’s primarily used for debugging purposes and may not affect production builds unless specifically configured.

Best practices when using this variable include:

  1. Use it for debugging and testing the Offset Root Bone functionality.
  2. Be aware that toggling this variable at runtime will affect all instances of Offset Root Bone nodes in the animation graph.
  3. Consider performance implications when frequently toggling this feature on and off.

Regarding the associated variable CVarAnimNodeOffsetRootBoneEnable:

#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:14

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);

namespace UE::Anim::OffsetRootBone

#Associated Variable and Callsites

This variable is associated with another variable named CVarAnimNodeOffsetRootBoneEnable. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OffsetRootBone.cpp:14

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);

namespace UE::Anim::OffsetRootBone

#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OffsetRootBone.cpp:90

Scope (from outer to inner):

file
function     void FAnimNode_OffsetRootBone::Evaluate_AnyThread

Source code excerpt:


#if ENABLE_ANIM_DEBUG
	if (CVarAnimNodeOffsetRootBoneEnable.GetValueOnAnyThread() == 0)
	{
		return;
	}
#endif

	bool bGraphDriven = false;