Applying external animation data to FAnimNode_ModifyBone

I have a custom asset editor, and I am attempting to apply some additive animation data to a skeletal mesh in the preview scene of the asset editor. The animation data (in parent bone space) is coming from our own animation system and is definitely correct as it can be used without issue to key an animation sequence for example, and this looks fine. However, when applying the same additive data to the FAnimNode_ModifyBone nodes used to drive joints in a preview scene, the animation can look very wrong.

It seems like this may be a settings or coordinate space issue but can’t tell for sure. I would appreciate any insight into the use of the FAnimNode_ModifyBone and if there is something I might be overlooking.

Turns out it was the transformation order which was being used by the FAnimNode_ModifyBone node. This node uses S->R->T whereas our incoming additive transform data is intended to be applied T->R->S. The way around this is to manually apply our additive data to the bone’s base transform using the intended transformation order. Then we just set the FAnimNode_ModifyBone node to use BMM_Replace instead of BMM_Additive. This means that the transform values are simply set rather than combined, and it then doesn’t matter in which order this happens.