How to bind c++ function to Output Animation Pose node

I am trying to avoid binding the Blueprint function to animation nodes.
Following this documentation on optimization for animation blueprint.

image

How can I bind c++ function defined in anim instance parent class to the on update function of the output animation pose node?

Thanks for your help :slight_smile:

3 Likes

I have this same question, I’ve tried adding meta specifiers to the functions of AnimBlueprintFunction and BlueprintThreadSafe, but despite that the UFUNCTION’s won’t appear in the bind list…

Update: I asked this in UnrealSlackers and got a response from one Muoio117 with the answer where it seems I had the wrong function signature, the correct signature is like so:

UFUNCTION(Category="StateNodeFunctions", BlueprintCallable, meta=(BlueprintThreadSafe))
void UpdateIdleState(const FAnimUpdateContext& Context, const FAnimNodeReference& Node);
2 Likes

Is it working for you? Unfortunately I still cant see the function getting listed in the dropdown.

Yes works for me - using that particular signature with the BlueprintCallable and BlueprintThreadSafe specifiers, and those two parameters and making sure they’re both const and passed in by reference, and are both the correct names. The signatures have to be an exact match for what Unreal is looking for

‘Z_Param_Out_ContextTemp’ uses undefined struct ‘FAnimUpdateContext’

do I need to include any module?

worked thanks :slight_smile:

#include “Animation/AnimExecutionContext.h”
#include “Animation/AnimNodeReference.h”

3 Likes