Procedurally animating one bone out of a SkinnedMesh

I have a skeletal mesh with a skeleton and a number of bones. Bone B is a child of bone A. In identity pose, the geometry bound to bone B ends up pointing straight down the X axis in actor (mesh) space. I have a world direction vector. I want to apply yaw on bone A and pitch on bone B to make the geometry bound to bone B point in that world space elevation. I know how to calculate the transform to go from mesh space forward-along-X into world space desired-forward-vector. I also know how to break this into degrees-yaw and degrees-pitch.

What I don’t know is how to take these values, and jam them into the pose of the skeletal mesh such that only these two bones change. I have no idle animation, no “end point” aim animations, or anything like that. I just want to jam rotation values into bones[a] and bones**.

How can I do this the easiest? I’ve been looking at an animation blueprint that can get my skeletal mesh, get the appropriate bone indices by name, and then I run into a brick wall – I can’t find any blueprint nodes that seem like they would do what I want. Also, the difference between the “event graph” and the “anim graph” seems somewhat superfluous to me, which probably means I’m missing some concept here.

I’ve read the animation documentation, which unfortunately talks only about the case where I have an animated character with full-body poses for various aim directions. I have none of that. Do I need to create all of those? That’d be a pain but possible if there’s no simpler way.

You need to you use the skeletal control nodes: Skeletal Controls | Unreal Engine Documentation
Specifically, the Transform (Modify) Bone node.

Thanks for the note.
I have seen that node, but I don’t know which space it works in, and I don’t know whether it’s relative or absolute.
Does it work in bone-local, parent-bone-local, or world space? (By local space I mean component space)
Does it replace the transform, or add to the transform, of the base (bind pose) bone?
The space transform widgets seem somewhat magic, too, because they don’t let me specify relative to which bone I’m converting spaces.

All skeletal controls take the pose in component space as input (or so the docs lead me to believe), however the bone translation/rotation/scale applied by the node itself can be specified in World Space, Component Space, Parent Bone Space, or Bone Space, and it can either add to the existing transform or replace it entirely. All of this can be set via the Details window in the bottom right corner. I’m not sure what you mean by the “space transform” widgets, the Component to Local and Local to Component nodes? If so they operate on the entire pose (i.e. all the bones).

Hmm. OK. I find that I have a lot of re-setting to do, because I’ve written animation systems in code before, and they are structured somewhat differently (for efficiency and capability reasons.)
Thanks for your pointers!

Yes, that all works a treat! I had not found all the checkbox/popups in the detail window, only looking at the node boxes and wondering what was going on.