How to get animation key values from a text file?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I try to make a tool, getting animation key values without opening a file.
I wonder if there a way to get animation key values from a text file.
I already tried to open maya text files and if my guess is right, the lines about key information are as following:
createNode animCurveTL -n "main_ctrl_translateZ";
setAttr ".tan" 18;
setAttr ".wgt" no;
setAttr -s 2 ".ktv[0:1]" 101 0 120 7.0140664544235554;
I assume, the “main_ctrl_translateZ” has two key values, like frame 101 is value “0” and frame 120 is value “7.0140664544235554”. Is it right?
And the second curious thing is when there are more than two same assets in one file, why is controller’s attribution name different like "main_ctrl_translateZ1"
I could not match key values with controller because of random attribution name.
I attached a file and I appreciate if you can check it out.
Thank you for your further information.