Convert expressions to keyframes++

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
i4n
Posts: 14
Joined: July 8th, 2011, 3:52 pm

I can perform any and all iterative tasks (loops, etc..), these snippets are the only thing holding me back:

*code to add/remove expression
*code to convert expressions to keyframes
*code to toggle "separate dimensions" (when dealing with xposition & yposition)

Would anyone kindly lend me a hand?
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

These things can only be done with scripts, not expressions. I'll move this to Scripts Discussions.

To add an expression to a property you would use:

Code: Select all

property.expression = "my expression";
To remove an expression you would use:

Code: Select all

property.expression = "";
To convert an expression to keyframes you would have to loop through the time of each frame in the comp, storing the times and the values in arrays, before removing the expression and setting property.valuesAtTimes(theTimes, theValues).

To separate dimensions, I would consult the CS4 scripting changes at:
http://blogs.adobe.com/toddkopriva/2008 ... ng-ch.html

And of course, feel free to ask more questions if you get stuck.
i4n
Posts: 14
Joined: July 8th, 2011, 3:52 pm

Thanks, Paul. You are a constant help in these threads. As I learn more I'll contribute, as I can..
Post Reply