UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimNode_BlendListBase.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
9#include "AlphaBlend.h"
10#include "AnimNode_BlendListBase.generated.h"
11
12class UBlendProfile;
13class UCurveFloat;
14
15UENUM()
21
22UENUM()
34
35// Blend list node; has many children
36USTRUCT(BlueprintInternalUseOnly)
38{
40
41protected:
42 UPROPERTY(EditAnywhere, EditFixedSize, Category=Links)
44
46#if WITH_EDITORONLY_DATA
47 UPROPERTY(EditAnywhere, EditFixedSize, Category=Config, meta=(PinShownByDefault, FoldProperty))
48 TArray<float> BlendTime;
49
50 UPROPERTY(EditAnywhere, Category=Config, meta=(FoldProperty))
52
53 UPROPERTY(EditAnywhere, Category=BlendType, meta=(FoldProperty))
54 EAlphaBlendOption BlendType = UE::Anim::DefaultBlendOption;
55
56protected:
57 UE_DEPRECATED(5.6, "Use ChildUpateMode instead.")
58 UPROPERTY(meta = (DeprecatedProperty, DeprecationMessage = "Use the ChildUpateMode instead"))
60
61 UPROPERTY(EditAnywhere, Category = Option, meta=(FoldProperty))
63
65 UPROPERTY(EditAnywhere, Category=BlendType, meta=(FoldProperty))
66 TObjectPtr<UCurveFloat> CustomBlendCurve = nullptr;
67
68 UPROPERTY(EditAnywhere, Category=BlendType, meta=(UseAsBlendProfile=true, FoldProperty))
69 TObjectPtr<UBlendProfile> BlendProfile = nullptr;
70#endif // #if WITH_EDITORONLY_DATA
71
72protected:
73 // Struct for tracking blends for each pose
75 {
77 float Weight;
80 };
81
83
84 // Per-bone blending data, allocated when using blend profiles
86
87 int32 LastActiveChildIndex = 0;
88
89 // The blend profile used for the current blend
90 // Note its possible that the blend profile changes based on the active child
91 UBlendProfile* CurrentBlendProfile = nullptr;
92
93public:
95 // Note: We need to explicitly disable warnings on these constructors/operators for clang to be happy with deprecated variables
96 // this is a requirement for clang to compile without warnings.
104 friend class UAnimGraphNode_BlendListBase;
105
106 // FAnimNode_Base interface
107 ANIMGRAPHRUNTIME_API virtual void Initialize_AnyThread(const FAnimationInitializeContext& Context) override;
108 ANIMGRAPHRUNTIME_API virtual void CacheBones_AnyThread(const FAnimationCacheBonesContext& Context) override;
109 ANIMGRAPHRUNTIME_API virtual void Update_AnyThread(const FAnimationUpdateContext& Context) override;
110 ANIMGRAPHRUNTIME_API virtual void Evaluate_AnyThread(FPoseContext& Output) override;
111 ANIMGRAPHRUNTIME_API virtual void GatherDebugData(FNodeDebugData& DebugData) override;
112 // End of FAnimNode_Base interface
113
114#if WITH_EDITOR
115 virtual void AddPose()
116 {
117 BlendTime.Add(0.1f);
118 BlendPose.AddDefaulted();
119 }
120
121 virtual void RemovePose(int32 PoseIndex)
122 {
123 BlendTime.RemoveAt(PoseIndex);
124 BlendPose.RemoveAt(PoseIndex);
125 }
126#endif
127
128public:
129 // Get the array of blend times to apply to our input poses
130 ANIMGRAPHRUNTIME_API const TArray<float>& GetBlendTimes() const;
131
132 // Get the type of transition that this blend list will make
133 ANIMGRAPHRUNTIME_API EBlendListTransitionType GetTransitionType() const;
134
135 // Get the blend type we will use when blending
136 ANIMGRAPHRUNTIME_API EAlphaBlendOption GetBlendType() const;
137
139 UE_DEPRECATED(5.6, "GetResetChildOnActivation is deprecated, please use GetChildUpdateMode instead.")
140 ANIMGRAPHRUNTIME_API bool GetResetChildOnActivation() const;
141
143 ANIMGRAPHRUNTIME_API EBlendListChildUpdateMode GetChildUpdateMode() const;
144
145 // Get the custom blend curve to apply when blending, if any
146 ANIMGRAPHRUNTIME_API UCurveFloat* GetCustomBlendCurve() const;
147
148 // Get the blend profile to use when blending, if any
149 // Note that its possible for the blend profile to change based on the active child
150 ANIMGRAPHRUNTIME_API virtual UBlendProfile* GetBlendProfile() const;
151
153 virtual int32 GetActiveChildIndex() { return 0; }
154 virtual FString GetNodeName(FNodeDebugData& DebugData) { return DebugData.GetNodeName(this); }
155
157 void InitializePerBoneData();
158 void SetCurrentBlendProfile(UBlendProfile* NewBlendProfile);
159
161};
EAlphaBlendOption
Definition AlphaBlend.h:13
EBlendListChildUpdateMode
Definition AnimNode_BlendListBase.h:24
EBlendListTransitionType
Definition AnimNode_BlendListBase.h:17
FORCEINLINE void BlendPose(const FTransformArrayA2 &SourcePoses, FTransformArrayA2 &ResultAtoms, const TArray< FBoneIndexType > &RequiredBoneIndices, const float BlendWeight)
Definition AnimationRuntime.cpp:143
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition UnrealType.h:3087
Definition Array.h:670
void RemoveAt(SizeType Index, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2083
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
Definition BlendListBaseLibrary.h:23
Definition BlendProfile.h:132
Definition CurveFloat.h:31
@ false
Definition radaudio_common.h:23
Definition AlphaBlend.h:71
Definition AnimNodeBase.h:853
Definition AnimNode_BlendListBase.h:75
FAlphaBlend Blend
Definition AnimNode_BlendListBase.h:76
float RemainingTime
Definition AnimNode_BlendListBase.h:78
float Weight
Definition AnimNode_BlendListBase.h:77
float StartAlpha
Definition AnimNode_BlendListBase.h:79
Definition AnimNode_BlendListBase.h:38
TArray< FBlendData > PerBlendData
Definition AnimNode_BlendListBase.h:82
~FAnimNode_BlendListBase()=default
PRAGMA_DISABLE_DEPRECATION_WARNINGS FAnimNode_BlendListBase()=default
FAnimNode_BlendListBase(const FAnimNode_BlendListBase &)=default
virtual FString GetNodeName(FNodeDebugData &DebugData)
Definition AnimNode_BlendListBase.h:154
FAnimNode_BlendListBase & operator=(const FAnimNode_BlendListBase &)=default
TArray< FBlendSampleData > PerBoneSampleData
Definition AnimNode_BlendListBase.h:85
FAnimNode_BlendListBase & operator=(FAnimNode_BlendListBase &&)=default
FAnimNode_BlendListBase(FAnimNode_BlendListBase &&)=default
Definition AnimNodeBase.h:337
Definition AnimNodeBase.h:324
Definition AnimNodeBase.h:354
Definition AnimNodeBase.h:642
FString GetNodeName(Type *Node)
Definition AnimNodeBase.h:704
Definition AnimNodeBase.h:479
Definition ObjectPtr.h:488