Save and restore animation

Hello! Is there way in MEL to save ALL animation from the maya scene into the text file... Restore only the key values at the every frame i need from this text file, and apply restored key values to the all objects (without animation, just the value of the keyable attributes) in exactly the same scene? I need it to remove all the animation from the file but place all the objects in every frame i choose, as it was in the file with animation.

Main questions are: What do I need saved to a text file?
How to query only the values ​​of the attributes in a specific frame (between the keys) from that text file?

the question is a bit vague. As there seems to be several unrelated requirements.

  • save animation to text file (since maya ASCII is a text file yes you can do this by normal save, however you might want to use anim export instead)
  • Your also adding a implied requirement that the data would be baked? Why on earth? Maya doent actually work that way. But sure you could do this does not make sense tough.

  • Restoring is stuff same thing again maya does not normally bake data so just import teh whole animation and disconnect it, its much easier.
  • In any case non of thees actually needed to accomplish the task of getting a snapshot per object. So care to explain the use case instead of actually bolting down architectural decision that dont actually bring you any closer to an answer.

    It would be much easier to just subset a different time for each object than when the time is shifted in place delete the data drivers. There is really no need to round trip into a text file, since you have the original file saved. And or you can just use anim files for this, whic is less dense than having each frame cached in a ascii file.