Copy link to clipboard
Copied
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
1 Correct answer
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
...Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
var logger = selLayers[0].property("ADBE Transform Group").property("ADBE Position").value
doesn't work?
(or 'keyValue' or 'valueAtTime' or 'valueAtKey' depending on context?)
Copy link to clipboard
Copied
Thank you for your reply. I was afraid of that. Ended up doing my own in the end.
That doesn't work. This will always give you just 1 value in different format. Anyway, thanks for the suggestion.

