Creating an animation blueprint with C++

Hello, Unreal community!

I am looking for a way to procedurally create an Animation Blueprint in C++. By that, I mean manipulating bones of a Skeleton by using arrays of bone names/translations/rotations that I get from a C++ class . To give some context, that class gets MoCap data coming in from TCP.

More specifically, I need to

  1. Create variables in the Animation Instance - floats, vectors, rotators

  2. Create an entire Anim Graph with code - getting an Animation Pose, creating Modify Bone nodes, applying the translation/rotations to the corresponding nodes, outputting that to Final Pose

  3. Assign values from my C++ TArrays to the procedurally generated Animation Instance variables

I found this Wiki entry from the knowledgeable Rama, which helped me understand how to extend the AnimBlueprint.h, but the process in step 2 is still a mystery.

I would appreciate any help with this. Best regards :slight_smile:

I’d really like to know #2 as well. It has eluded me for some time.

I posted this on Facebook’s UE dev community, and a guy called Leon Rosengarten, who wrote a Kinect plugin, sent me a link to his source code, which apparently does that.

I still haven’t looked into the code, and as soon as I have a definitive answer on how to do that I’ll mark this as resolved and post specific instructions, but if you want to check it out for yourself, here’s the link. You need to link your Github account to UE to view this.

Do you have Github account? Can you publish this code?