Animation Curve and dope sheets

So I have an array of textures(sprites) in a folder, and I want them to be auto’magically’ added as an animation using dope sheets.

I have my script as a post process script, and everything is fine. The problem is when I create the animation curve and need to specify the value for the keyframe, I don’t know how to say the value is a sprite. I was also looking at AnimationClipCurveData class, and that had information about isPPtrCurve? I am not sure what that means. When I was doing testing with another .anim file and read what was in the animation file, it was also under the m_PPtrCurves.

Example from the anim file:

m_PPtrCurves:
  - curve:
    - time: 0
      value: {fileID: 21300000, guid: 2db951592866b4a3daa4f31d39489305, type: 3}
    - time: .25
      value: {fileID: 21300000, guid: b156bffea13744a49807b9c979d95840, type: 3}
    - time: .75
      value: {fileID: 0}

I figure my other option is using the YAML format and creating the .anim from scratch and pass the guid as the value.

Since I couldn’t find an answer on AnimationCurves, I decided to just use the YAML format for the .anim file. Then replace the guid’s with the ones in the .meta files of the sprites. And it works.