a.AnimNode.OrientationWarping.Enable

a.AnimNode.OrientationWarping.Enable

#Overview

name: a.AnimNode.OrientationWarping.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.OrientationWarping.Enable is to toggle the Orientation Warping feature in Unreal Engine 5’s animation system. This setting variable is used to control whether the Orientation Warping functionality is active or not.

This setting variable is primarily used by the Animation Warping plugin, specifically within the Orientation Warping module. It is part of the animation system in Unreal Engine 5.

The value of this variable is set as a console variable with a default value of 1 (enabled). It can be changed at runtime through the console or programmatically.

The associated variable CVarAnimNodeOrientationWarpingEnable directly interacts with a.AnimNode.OrientationWarping.Enable. They share the same value and purpose.

Developers must be aware that this variable is used to conditionally enable or disable the Orientation Warping feature. When set to 0, it will prevent the Orientation Warping node from being evaluated, effectively disabling the feature.

Best practices when using this variable include:

  1. Use it for debugging or performance optimization purposes.
  2. Be cautious when disabling it in production, as it may affect the quality of animations that rely on Orientation Warping.
  3. Consider exposing this setting in the game’s options menu if you want to give users control over this feature.

Regarding the associated variable CVarAnimNodeOrientationWarpingEnable:

The purpose of CVarAnimNodeOrientationWarpingEnable is identical to a.AnimNode.OrientationWarping.Enable. It is the C++ implementation of the console variable.

This variable is used within the AnimationWarping plugin, specifically in the FAnimNode_OrientationWarping class.

The value of this variable is set when the console variable is initialized, with a default value of 1.

CVarAnimNodeOrientationWarpingEnable directly interacts with a.AnimNode.OrientationWarping.Enable, as they represent the same setting.

Developers should be aware that this variable is checked in performance-critical code paths, specifically in the IsValidToEvaluate function of FAnimNode_OrientationWarping.

Best practices for using this variable include:

  1. Use GetValueOnAnyThread() when accessing the value for thread-safety.
  2. Consider caching the value if it’s accessed frequently in performance-critical sections.
  3. Be aware that changes to this variable will immediately affect the behavior of the Orientation Warping system.

#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_OrientationWarping.cpp:18

Scope: file

Source code excerpt:

static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingDebug(TEXT("a.AnimNode.OrientationWarping.Debug"), 0, TEXT("Turn on visualization debugging for Orientation Warping."));
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingVerbose(TEXT("a.AnimNode.OrientationWarping.Verbose"), 0, TEXT("Turn on verbose graph debugging for Orientation Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingEnable(TEXT("a.AnimNode.OrientationWarping.Enable"), 1, TEXT("Toggle Orientation Warping"));
#endif

namespace UE::Anim
{
	static inline FVector GetAxisVector(const EAxis::Type& InAxis)
	{

#Associated Variable and Callsites

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

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

Scope: file

Source code excerpt:

static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingDebug(TEXT("a.AnimNode.OrientationWarping.Debug"), 0, TEXT("Turn on visualization debugging for Orientation Warping."));
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingVerbose(TEXT("a.AnimNode.OrientationWarping.Verbose"), 0, TEXT("Turn on verbose graph debugging for Orientation Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingEnable(TEXT("a.AnimNode.OrientationWarping.Enable"), 1, TEXT("Toggle Orientation Warping"));
#endif

namespace UE::Anim
{
	static inline FVector GetAxisVector(const EAxis::Type& InAxis)
	{

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

Scope (from outer to inner):

file
function     bool FAnimNode_OrientationWarping::IsValidToEvaluate

Source code excerpt:

{
#if ENABLE_ANIM_DEBUG
	if (CVarAnimNodeOrientationWarpingEnable.GetValueOnAnyThread() == 0)
	{
		return false;
	}
#endif
	if (RotationAxis == EAxis::None)
	{