Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Export keyframe data to .txt file

Explorer ,
Oct 12, 2016 Oct 12, 2016

Hello,

is it possible to get keyframe data using script? I am talking about the information which you get when select property in AE, press ctrl+c and ctrl+v it into txt file. Looks like this:

Adobe After Effects 8.0 Keyframe Data

    Units Per Second    30

    Source Width    100

    Source Height    100

    Source Pixel Aspect Ratio    1

    Comp Pixel Aspect Ratio    1

Transform    Position

    Frame    X pixels    Y pixels    Z pixels   

    343    960    540    0   

    376    430.101    98.6763    0   

    397    430.101    98.6763    0   

    416    493.813    221.439    0   

...

But when i try this:

var logger = selLayers[0].property("ADBE Transform Group").property("ADBE Position");

     myFile.open('w');

     myFile.write(logger);

     myFile.close();

I get a text file with "[object Property]" in it.

How can I get the data in the format like stated above please?

Thank you,

Martin

TOPICS
Scripting
10.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Oct 12, 2016 Oct 12, 2016

There is no-ready made way.

One possibility is to make your own, using the Property object methods

(myProperty.keyTime(keyIndex), myProperty.keyValue(keyIndex), etc).

If you want to have it phrased exactly like AE does, you can also make sure that only that property is selected, that the comp containing it is open in a viewer, then do:

app.executeCommand(app.findMenuCommandId("Copy"));

This copies the property data in the clipboard. But then you'd have to find a way to retrieve the clipboard's conten

...
Translate
Advocate ,
Oct 12, 2016 Oct 12, 2016

There is no-ready made way.

One possibility is to make your own, using the Property object methods

(myProperty.keyTime(keyIndex), myProperty.keyValue(keyIndex), etc).

If you want to have it phrased exactly like AE does, you can also make sure that only that property is selected, that the comp containing it is open in a viewer, then do:

app.executeCommand(app.findMenuCommandId("Copy"));

This copies the property data in the clipboard. But then you'd have to find a way to retrieve the clipboard's content (depends on OS...).

Xavier

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 12, 2016 Oct 12, 2016

var logger = selLayers[0].property("ADBE Transform Group").property("ADBE Position").value

doesn't work?

(or 'keyValue' or 'valueAtTime' or 'valueAtKey' depending on context?)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 13, 2016 Oct 13, 2016
LATEST

Thank you for your reply. I was afraid of that. Ended up doing my own in the end.

@

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines