UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimNode_PoseDriver.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"
7#include "BoneContainer.h"
10#include "RBF/RBFSolver.h"
11#include "AnimNode_PoseDriver.generated.h"
12
13// Deprecated
14UENUM()
21
23UENUM(BlueprintType)
25{
28
31};
32
34UENUM(BlueprintType)
43
45USTRUCT()
47{
49
50
51 UPROPERTY(EditAnywhere, Category = PoseDriver)
52 FVector TargetTranslation;
53
55 UPROPERTY(EditAnywhere, Category = PoseDriver)
56 FRotator TargetRotation;
57
59 : TargetTranslation(FVector::ZeroVector)
60 , TargetRotation(FRotator::ZeroRotator)
61 {}
62};
63
65USTRUCT()
67{
69
70
71 UPROPERTY(EditAnywhere, Category = PoseDriver)
73
75 UPROPERTY(EditAnywhere, Category = PoseDriver)
76 FRotator TargetRotation;
77
79 UPROPERTY(EditAnywhere, Category = PoseDriver)
80 float TargetScale;
81
83 UPROPERTY(EditAnywhere, Category = RBFData)
84 ERBFDistanceMethod DistanceMethod;
85
87 UPROPERTY(EditAnywhere, Category = RBFData)
88 ERBFFunctionType FunctionType;
89
91 UPROPERTY(EditAnywhere, Category = PoseDriver)
92 bool bApplyCustomCurve;
93
95 UPROPERTY(EditAnywhere, Category = PoseDriver)
97
103 UPROPERTY(EditAnywhere, Category = PoseDriver)
104 FName DrivenName;
105
107 int32 PoseCurveIndex;
108
110 UPROPERTY(EditAnywhere, Category = PoseDriver)
111 bool bIsHidden;
112
113 // removing deprecation for default copy operator/constructor to avoid deprecation warnings
116 FPoseDriverTarget& operator=(const FPoseDriverTarget&) = default;
118
120 : TargetRotation(ForceInitToZero)
121 , TargetScale(1.f)
122 , DistanceMethod(ERBFDistanceMethod::DefaultMethod)
123 , FunctionType(ERBFFunctionType::DefaultFunction)
124 , bApplyCustomCurve(false)
125 , DrivenName(NAME_None)
126 , PoseCurveIndex(INDEX_NONE)
127 , bIsHidden(false)
128 {}
129};
130
132USTRUCT(BlueprintInternalUseOnly)
134{
136
137
138 UPROPERTY(EditAnywhere, EditFixedSize, BlueprintReadWrite, Category = PoseDriver)
139 FPoseLink SourcePose;
140
142 UPROPERTY(EditAnywhere, Category = PoseDriver)
143 TArray<FBoneReference> SourceBones;
144
149 UPROPERTY(EditAnywhere, Category = PoseDriver)
150 FBoneReference EvalSpaceBone;
151
159 UPROPERTY(EditAnywhere, Category = PoseDriver)
160 bool bEvalFromRefPose = false;
161
163 UPROPERTY(EditAnywhere, Category = PoseDriver, meta = (EditCondition = "DriveOutput == EPoseDriverOutput::DrivePoses"))
164 TArray<FBoneReference> OnlyDriveBones;
165
167 UPROPERTY(EditAnywhere, Category = PoseDriver)
169
171 UPROPERTY(EditAnywhere, Category = PoseDriver, meta = (ShowOnlyInnerProperties))
172 FRBFParams RBFParams;
173
175 UPROPERTY(EditAnywhere, Category = PoseDriver)
176 EPoseDriverSource DriveSource;
177
179 UPROPERTY(EditAnywhere, Category = PoseDriver)
180 EPoseDriverOutput DriveOutput;
181
183 TArray<FRBFOutputWeight> OutputWeights;
184
186 TArray<FTransform> SourceBoneTMs;
187
189 bool bHasOnlyDriveBones = false;
190
193
194#if WITH_EDITORONLY_DATA
195 // Deprecated
196 UPROPERTY()
198 UPROPERTY()
200 UPROPERTY()
201 EPoseDriverType Type_DEPRECATED;
202 UPROPERTY()
204 //
205#endif
206
209
210#if WITH_EDITORONLY_DATA
214
216 UPROPERTY()
218#endif
219
220 /*
221 * Max LOD that this node is allowed to run
222 * For example if you have LODThreshold to be 2, it will run until LOD 2 (based on 0 index)
223 * when the component LOD becomes 3, it will stop update/evaluate
224 * currently transition would be issue and that has to be re-visited
225 */
226 UPROPERTY(EditAnywhere, Category = Performance, meta = (PinHiddenByDefault, DisplayName = "LOD Threshold"))
227 int32 LODThreshold;
228
229 // FAnimNode_Base interface
233 ANIMGRAPHRUNTIME_API virtual void Evaluate_AnyThread(FPoseContext& Output) override;
234 ANIMGRAPHRUNTIME_API virtual void GatherDebugData(FNodeDebugData& DebugData) override;
235 virtual int32 GetLODThreshold() const override { return LODThreshold; }
236 // End of FAnimNode_Base interface
237
239
241 ANIMGRAPHRUNTIME_API float GetRadiusForTarget(const FRBFTarget& Target) const;
242
244 ANIMGRAPHRUNTIME_API bool IsBoneDriven(FName BoneName) const;
245
247 ANIMGRAPHRUNTIME_API void GetRBFTargets(TArray<FRBFTarget>& OutTargets, const FBoneContainer* BoneContainer) const;
248
249 /* Rebuild Pose List*/
250 ANIMGRAPHRUNTIME_API virtual void RebuildPoseList(const FBoneContainer& InBoneContainer, const UPoseAsset* InPoseAsset) override;
251
252private:
254 FRBFEntry RBFInput;
255 TArray<FRBFTarget> RBFTargets;
256};
EPoseDriverType
Definition AnimNode_PoseDriver.h:16
EPoseDriverOutput
Definition AnimNode_PoseDriver.h:36
EPoseDriverSource
Definition AnimNode_PoseDriver.h:25
EBoneAxis
Definition AnimTypes.h:50
@ INDEX_NONE
Definition CoreMiscDefines.h:150
@ ForceInitToZero
Definition CoreMiscDefines.h:156
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 PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
const bool
Definition NetworkReplayStreaming.h:178
#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
ERBFFunctionType
Definition RBFSolver.h:43
ERBFDistanceMethod
Definition RBFSolver.h:61
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition NameTypes.h:617
Definition Array.h:670
Definition EnumAsByte.h:22
Definition SharedPointer.h:692
Definition PoseAsset.h:186
@ false
Definition radaudio_common.h:23
Definition AnimNode_PoseDriver.h:134
uint8 bCachedDrivenIDsAreDirty
Definition AnimNode_PoseDriver.h:208
Definition AnimNode_PoseHandler.h:17
Definition AnimNodeBase.h:337
Definition AnimNodeBase.h:324
Definition AnimNodeBase.h:354
Definition BoneContainer.h:192
Definition BoneReference.h:14
Definition BoneIndices.h:63
Definition AnimNodeBase.h:642
Definition AnimNodeBase.h:479
Definition AnimNode_PoseDriver.h:67
Definition AnimNode_PoseDriver.h:47
Definition RBFSolver.h:112
Definition RBFSolver.h:181
Definition RBFSolver.h:201
Definition RBFSolver.h:143
Definition RichCurve.h:200