UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimNode_CallFunction.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
7#include "AnimNode_CallFunction.generated.h"
8
9// When to call the function during the execution of the animation graph
10UENUM()
12{
13 // Called when the node is initialized - i.e. it becomes weighted/relevant in the graph (before child nodes are initialized)
15
16 // Called when the node is updated (before child nodes are updated)
18
19 // Called when the node is updated for the first time with a valid weight
21
22 // Called when the node is evaluated (before child nodes are evaluated)
24
25 // Called when the node is initialized - i.e. it becomes weighted/relevant in the graph (after child nodes are initialized)
26 OnInitializePostRecursion UMETA(DisplayName = "On Initialize (Post Recursion)"),
27
28 // Called when the node is updated (after child nodes are updated)
29 OnUpdatePostRecursion UMETA(DisplayName = "On Update (Post Recursion)"),
30
31 // Called when the node is updated for the first time with a valid weight (after child nodes are updated)
32 OnBecomeRelevantPostRecursion UMETA(DisplayName = "On Become Relevant (Post Recursion)"),
33
34 // Called when the node is evaluated (after child nodes are evaluated)
35 OnEvaluatePostRecursion UMETA(DisplayName = "On Evaluate (Post Recursion)"),
36
37 // Called when the node is updated, was at full weight and beings to blend out. Called before child nodes are
38 // updated
40
41 // Called when the node is updated, was at zero weight and beings to blend in. Called before child nodes are updated
43
44 // Called when the node is updated, was at non-zero weight and finishes blending out. Called before child nodes are
45 // updated (note that this is necessarily not called within the graph update but from outside)
46 // @TODO: Not currently supported, needs subsystem support!
48
49 // Called when the node is updated, was at non-zero weight and becomes full weight. Called before child nodes are
50 // updated
52};
53
55USTRUCT(BlueprintInternalUseOnly)
57{
59
60 UPROPERTY(EditAnywhere, Category = Links)
61 FPoseLink Source;
62
63#if WITH_EDITORONLY_DATA
64 // Function to call
67#endif
68
69 // Counter used to determine relevancy
71
72 // Weight to determine blend-related call sites
73 float CurrentWeight = 0.0f;
74
75 // When to call the function during the execution of the animation graph
76 UPROPERTY(EditAnywhere, Category="Function")
78
79 // FAnimNode_Base interface
81 virtual bool NeedsOnInitializeAnimInstance() const override { return true; }
82 ANIMGRAPHRUNTIME_API virtual void GatherDebugData(FNodeDebugData& DebugData) override;
83 ANIMGRAPHRUNTIME_API virtual void Update_AnyThread(const FAnimationUpdateContext& Context) override;
84 ANIMGRAPHRUNTIME_API virtual void Evaluate_AnyThread(FPoseContext& Context) override;
85 ANIMGRAPHRUNTIME_API virtual void Initialize_AnyThread(const FAnimationInitializeContext& Context) override;
86 ANIMGRAPHRUNTIME_API virtual void CacheBones_AnyThread(const FAnimationCacheBonesContext& Context) override;
87 // End of FAnimNode_Base interface
88
89 // Calls the function we hold if the callsite matches the one we have set
90 ANIMGRAPHRUNTIME_API void CallFunctionFromCallSite(EAnimFunctionCallSite InCallSite, const FAnimationBaseContext& InContext) const;
91
92 // Get the function held on this node
93 ANIMGRAPHRUNTIME_API const FAnimNodeFunctionRef& GetFunction() const;
94};
EAnimFunctionCallSite
Definition AnimNode_CallFunction.h:12
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#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
Definition AnimInstance.h:353
Definition AnimInstanceProxy.h:144
Definition AnimNodeFunctionRef.h:25
Definition AnimNodeBase.h:853
Definition AnimNode_CallFunction.h:57
FGraphTraversalCounter Counter
Definition AnimNode_CallFunction.h:70
Definition AnimNodeBase.h:159
Definition AnimNodeBase.h:337
Definition AnimNodeBase.h:324
Definition AnimNodeBase.h:354
Definition AnimTypes.h:144
Definition AnimNodeBase.h:642
Definition AnimNodeBase.h:479