SampleAnimation mirrored in edit mode

Hello,

I currently have a script which uses AnimationClip.SampleAnimation() (in edit mode in the editor) to sample the beginning and ending pose of a humanoid animation clip to store in metadata (for quick lookup of certain bone offsets, etc.). This clip is used by two different animator controllers, one of which mirrors the clip at the state level in the controller. Therefore, I’d like to sample the beginning and end poses of the mirrored version as well.

I’m wondering: is there a way to sample this clip (via AnimationClip.SampleAnimation(), or something similar) as though it were mirrored?

I know that I could create another clip on the FBX (or in a standalone .anim file) that is mirrored, and load and sample that clip. That seems excessive, however, since we don’t need a whole mirrored clip for any other purpose in the game or animation processing, since we handle the mirroring at the animator controller level. So then I would need to go through and delete the new mirrored clip afterwards, which is something I’m hoping to avoid.

I was looking at ModelImporterClipAnimation, which is the direction I would go to actually create another clip that was mirrored. However, I don’t understand how I can use this to simply mirror the clip in memory without writing out an asset and then loading that (now mirrored) clip. If I could change the mirror flag on the clip and re-import the clip all in memory, without ever writing anything to the asset, that would work ok, but I’m not clear on how to do that.

Am I missing something, or is there simply no straightforward way to take a humanoid clip and sample it in edit mode as though it was mirrored?