UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimBlueprint.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 "Misc/Guid.h"
8#include "Engine/Blueprint.h"
10#include "AnimBlueprint.generated.h"
11
12class SWidget;
13class UAnimationAsset;
14class USkeletalMesh;
15class USkeleton;
16class UPoseWatch;
20class UClass;
21
22USTRUCT()
38
39USTRUCT()
41{
43
44 UPROPERTY()
46 UPROPERTY()
47 FGuid ParentNodeGuid;
48
53
55 : NewAsset(NULL)
56 {}
57
58 bool operator ==(const FAnimParentNodeAssetOverride& Other)
59 {
60 return ParentNodeGuid == Other.ParentNodeGuid;
61 }
62};
63
65UENUM()
74
80UCLASS(BlueprintType, MinimalAPI)
82{
84
85
90 UPROPERTY(AssetRegistrySearchable, EditAnywhere, AdvancedDisplay, Category=ClassOptions)
91 TObjectPtr<USkeleton> TargetSkeleton;
92
93 // List of animation sync groups
94 UPROPERTY()
96
97 // This is an anim blueprint that acts as a set of template functionality without being tied to a specific skeleton.
98 // Implies a null TargetSkeleton.
99 UPROPERTY(AssetRegistrySearchable)
100 bool bIsTemplate;
101
108 UPROPERTY(EditAnywhere, Category = Optimization)
109 bool bUseMultiThreadedAnimationUpdate;
110
115 UPROPERTY(EditAnywhere, Category = Optimization)
116 bool bWarnAboutBlueprintUsage;
117
120 UPROPERTY(EditDefaultsOnly, Category = Optimization)
121 uint8 bEnableLinkedAnimLayerInstanceSharing : 1;
122
123 // @todo document
124 ENGINE_API class UAnimBlueprintGeneratedClass* GetAnimBlueprintGeneratedClass() const;
125
126 // @todo document
127 ENGINE_API class UAnimBlueprintGeneratedClass* GetAnimBlueprintSkeletonClass() const;
128
129 ENGINE_API virtual void Serialize(FArchive& Ar) override;
130
131#if WITH_EDITOR
132
133 ENGINE_API virtual UClass* GetBlueprintClass() const override;
134
135 // Inspects the hierarchy and looks for an override for the requested node GUID
136 // @param NodeGuid - Guid of the node to search for
137 // @param bIgnoreSelf - Ignore this blueprint and only search parents, handy for finding parent overrides
138 ENGINE_API FAnimParentNodeAssetOverride* GetAssetOverrideForNode(FGuid NodeGuid, bool bIgnoreSelf = false) const ;
139
140 // Inspects the hierarchy and builds a list of all asset overrides for this blueprint
141 // @param OutOverrides - Array to fill with overrides
142 // @return bool - Whether any overrides were found
144
145 // UBlueprint interface
146 virtual bool SupportedByDefaultBlueprintFactory() const override
147 {
148 return false;
149 }
150
151 virtual bool IsValidForBytecodeOnlyRecompile() const override { return false; }
152 ENGINE_API virtual bool CanAlwaysRecompileWhilePlayingInEditor() const override;
153 // End of UBlueprint interface
154
155 // Finds the index of the specified group, or creates a new entry for it (unless the name is NAME_None, which will return INDEX_NONE)
157
160
163
165
166 typedef FOnOverrideChangedMulticaster::FDelegate FOnOverrideChanged;
167
169 {
170 OnOverrideChanged.Add(Delegate);
171 }
172
174 {
175 OnOverrideChanged.RemoveAll(Widget);
176 }
177
179 {
180 OnOverrideChanged.Broadcast(Override.ParentNodeGuid, Override.NewAsset);
181 }
182
183 ENGINE_API virtual void PostLoad() override;
184 ENGINE_API virtual bool FindDiffs(const UBlueprint* OtherBlueprint, FDiffResults& Results) const override;
185 ENGINE_API virtual void SetObjectBeingDebugged(UObject* NewObject) override;
186 ENGINE_API virtual bool SupportsAnimLayers() const override;
187 ENGINE_API virtual bool SupportsEventGraphs() const override;
188 ENGINE_API virtual bool SupportsDelegates() const override;
189 ENGINE_API virtual bool SupportsMacros() const override;
190 ENGINE_API virtual bool SupportsInputEvents() const override;
191 ENGINE_API virtual bool AllowFunctionOverride(const UFunction* const InFunction) const override;
192 ENGINE_API virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
193 ENGINE_API virtual void GetTypeActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override;
194 ENGINE_API virtual void GetInstanceActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override;
195
196protected:
197 // Broadcast when an override is changed, allowing derived blueprints to be updated
199#endif // #if WITH_EDITOR
200
201public:
203 ENGINE_API virtual void SetPreviewMesh(USkeletalMesh* PreviewMesh, bool bMarkAsDirty = true) override;
204 ENGINE_API virtual USkeletalMesh* GetPreviewMesh(bool bFindIfNotSet = false) override;
205 ENGINE_API virtual USkeletalMesh* GetPreviewMesh() const override;
206
208 ENGINE_API void SetPreviewAnimationBlueprint(UAnimBlueprint* InPreviewAnimationBlueprint);
209 ENGINE_API UAnimBlueprint* GetPreviewAnimationBlueprint() const;
210
211 ENGINE_API void SetPreviewAnimationBlueprintApplicationMethod(EPreviewAnimationBlueprintApplicationMethod InMethod);
212 ENGINE_API EPreviewAnimationBlueprintApplicationMethod GetPreviewAnimationBlueprintApplicationMethod() const;
213
214 ENGINE_API void SetPreviewAnimationBlueprintTag(FName InTag);
215 ENGINE_API FName GetPreviewAnimationBlueprintTag() const;
216
217public:
219 ENGINE_API bool IsObjectBeingDebugged(const UObject* AnimInstance) const;
220
222 ENGINE_API FAnimBlueprintDebugData* GetDebugData() const;
223
224#if WITH_EDITORONLY_DATA
225public:
226 // Queue a refresh of the set of anim blueprint extensions that this anim blueprint hosts.
227 // Usually called from anim graph nodes to ensure that extensions that are no longer required are cleaned up.
229
230 // Check if the anim BP is compatible with this one (for linked instancing). Checks target skeleton, template flags
231 // blueprint type.
232 // Note compatibility is directional - e.g. template anim BPs can be instanced within any 'regular' anim BP, but not
233 // vice versa
234 // @param InAnimBlueprint The anim blueprint to check for compatibility
235 ENGINE_API bool IsCompatible(const UAnimBlueprint* InAnimBlueprint) const;
236
237 // Check if the asset path of a skeleton, template and interface flags are compatible with this anim blueprint
238 // (for linked instancing)
239 // @param InSkeletonAsset The asset path of the skeleton asset used by the anim blueprint
240 // @param bInIsTemplate Whether the anim blueprint to check is a template
241 // @param bInIsInterface Whether the anim blueprint to check is an interface
243
244 // Get the default binding type that any new nodes will use when created
246
247 virtual void NotifyGraphRenamed(class UEdGraph* Graph, FName OldName, FName NewName) override;
248
249 // Event that is broadcast to inform observers that the node title has changed
250 // The default SAnimationGraphNode uses this to invalidate cached node title text
253
254private:
256
257public:
258 // Array of overrides to asset containing nodes in the parent that have been overridden
259 UPROPERTY()
261
262 // Array of active pose watches (pose watches allows us to see the bone pose at a
263 // particular point of the anim graph and control debug draw for unselected anim nodes).
264 UPROPERTY()
266
267 UPROPERTY()
269
270private:
271 friend class FAnimBlueprintCompilerContext;
272
274 UPROPERTY(duplicatetransient, AssetRegistrySearchable)
276
281 UPROPERTY(duplicatetransient, AssetRegistrySearchable)
283
285 UPROPERTY(EditAnywhere, Category=Bindings, meta=(AllowedClasses="/Script/AnimGraph.AnimGraphNodeBinding", ShowDisplayNames=true, NoClear))
287
289 UPROPERTY()
291
293 UPROPERTY()
295
298#endif // WITH_EDITORONLY_DATA
299};
#define NULL
Definition oodle2base.h:134
EPreviewAnimationBlueprintApplicationMethod
Definition AnimBlueprint.h:67
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 DECLARE_MULTICAST_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:58
#define DECLARE_EVENT_ThreeParams(OwningType, EventName, Param1Type, Param2Type, Param3Type)
Definition DelegateCombinations.h:69
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition Archive.h:1208
Definition NameTypes.h:617
Definition Interface_PreviewMeshProvider.h:20
Definition SWidget.h:165
Definition Array.h:670
Definition AnimBlueprintGeneratedClass.h:366
Definition AnimBlueprint.h:82
Definition AnimationAsset.h:1020
Definition Blueprint.h:403
Definition Class.h:3793
Definition EdGraph.h:68
Definition Class.h:2476
Definition Object.h:95
Definition PoseWatch.h:33
Definition PoseWatch.h:267
Definition SkeletalMesh.h:440
Definition Skeleton.h:295
Definition AnimBlueprintGeneratedClass.h:163
Definition AnimBlueprint.h:24
Definition AnimBlueprint.h:41
FAnimParentNodeAssetOverride()
Definition AnimBlueprint.h:54
Definition DiffResults.h:171
Definition Guid.h:109
Definition Color.h:48
Definition UnrealType.h:6865
Definition ObjectPtr.h:488
Definition SoftObjectPtr.h:174