UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimNode_BlendSpaceGraphBase.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 "AnimNode_BlendSpaceGraphBase.generated.h"
10
11class UBlendSpace;
12
13// Allows multiple animations to be blended between based on input parameters
14USTRUCT(BlueprintInternalUseOnly)
16{
18
20
21 // @return the blendspace that this node uses
22 const UBlendSpace* GetBlendSpace() const { return BlendSpace; }
23
24 // @return the current sample coordinates that this node is using to sample the blendspace
25 FVector GetPosition() const { return FVector(X, Y, 0); }
26
27 // @return the current sample coordinates after going through the filtering
28 FVector GetFilteredPosition() const { return BlendFilter.GetFilterLastOutput(); }
29
30#if WITH_EDITORONLY_DATA
31 // Set the node to preview a supplied sample value
33#endif
34
35 // Forces the Position to the specified value
36 ANIMGRAPHRUNTIME_API void SnapToPosition(const FVector& NewPosition);
37
38protected:
39 // The X coordinate to sample in the blendspace
40 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Coordinates, meta = (PinShownByDefault, AllowPrivateAccess))
41 float X = 0.0f;
42
43 // The Y coordinate to sample in the blendspace
44 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Coordinates, meta = (PinShownByDefault, AllowPrivateAccess))
45 float Y = 0.0f;
46
47 // The group name that we synchronize with (NAME_None if it is not part of any group). Note that
48 // this is the name of the group used to sync the output of this node - it will not force
49 // syncing of animations contained by it. Animations inside this Blend Space have their own
50 // options for syncing.
51 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Sync, meta = (NeverAsPin, AllowPrivateAccess))
52 FName GroupName = NAME_None;
53
54 // The role this Blend Space can assume within the group (ignored if GroupName is not set). Note
55 // that this is the role of the output of this node, not of animations contained by it.
56 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Sync, meta = (NeverAsPin, AllowPrivateAccess))
57 TEnumAsByte<EAnimGroupRole::Type> GroupRole = EAnimGroupRole::CanBeLeader;
58
59 // The internal blendspace asset to play
60 UPROPERTY()
61 TObjectPtr<const UBlendSpace> BlendSpace = nullptr;
62
63 // Pose links for each sample in the blendspace
64 UPROPERTY()
65 TArray<FPoseLink> SamplePoseLinks;
66
68 // FIR filter applied to inputs
69 FBlendFilter BlendFilter;
70
71 // Cache of sampled data, updated each frame
72 TArray<FBlendSampleData> BlendSampleDataCache;
73
75 int32 CachedTriangulationIndex = -1;
76
77#if WITH_EDITORONLY_DATA
78 // Preview blend params - set in editor only
80
81 // Whether to use the preview blend params
82 bool bUsePreviewPosition = false;
83#endif
84
85 // Internal update handler, skipping evaluation of exposed inputs
86 ANIMGRAPHRUNTIME_API void UpdateInternal(const FAnimationUpdateContext& Context);
87
88protected:
89 // FAnimNode_Base interface
90 ANIMGRAPHRUNTIME_API virtual void Initialize_AnyThread(const FAnimationInitializeContext& Context) override;
91 ANIMGRAPHRUNTIME_API virtual void CacheBones_AnyThread(const FAnimationCacheBonesContext& Context) override;
92 ANIMGRAPHRUNTIME_API virtual void Update_AnyThread(const FAnimationUpdateContext& Context) override;
93 ANIMGRAPHRUNTIME_API virtual void Evaluate_AnyThread(FPoseContext& Output) override;
94 ANIMGRAPHRUNTIME_API virtual void GatherDebugData(FNodeDebugData& DebugData) override;
95 // End of FAnimNode_Base interface
96};
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
#define X(Name, Desc)
Definition FormatStringSan.h:47
#define FVector
Definition IOSSystemIncludes.h:8
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
Definition NameTypes.h:617
Definition Array.h:670
Definition EnumAsByte.h:22
Definition BlendSpace.h:467
friend class UAnimGraphNode_BlendSpaceGraphBase
Definition BlendSpace.h:474
Definition AnimationAsset.h:592
Definition AnimNodeBase.h:853
Definition AnimNode_BlendSpaceGraphBase.h:16
FVector GetPosition() const
Definition AnimNode_BlendSpaceGraphBase.h:25
FVector GetFilteredPosition() const
Definition AnimNode_BlendSpaceGraphBase.h:28
Definition AnimNodeBase.h:337
Definition AnimNodeBase.h:324
Definition AnimNodeBase.h:354
Definition AnimationAsset.h:209
Definition AnimationAsset.h:122
Definition AnimNodeBase.h:642
Definition AnimNodeBase.h:479
Definition ObjectPtr.h:488
static CORE_API const TVector< double > ZeroVector
Definition Vector.h:79