Page 1 of 1

Bake expressions

Posted: December 17th, 2013, 4:07 pm
by scribling
I'm in need of a script that would bake expressions and remove them. Basically, I have to do this to simplify comps for stereo conversion.

When I do it manually, I convert expressions to keyframes, delete the expressions then delete the keyframes.
I was thinking a script could surely do this much faster. Also, it could have an option to leave the keyframes, in case there is animation.

I use the "lock properties" script to remove the expressions after I've made the keyframes. So, maybe it would be similar to that script.

Thanks,

Re: Bake expressions

Posted: January 8th, 2014, 2:45 pm
by zip
http://forums.creativecow.net/thread/227/13039#13041

this script can convert all expression to keyframes(on pos.,rot.,scale....), on selected layer, u can modified it and add delete keyframes, and delete expression

for del expression u can try use
function convertToKeyframes(theProperty)
{
if (theProperty.canSetExpression && theProperty.expressionEnabled)
{
theProperty.selected = true;
app.executeCommand(app.findMenuCommandId("Convert Expression to Keyframes"));
theProperty.selected = false;

theProperty.expression=""; // add this, and also add script for deleting keyframes(if u find how , because i dont know)
}
}

Re: Bake expressions

Posted: January 14th, 2014, 6:27 pm
by scribling
Well, it's a start, but unfortunately my expressions are on an effect and not transform properties. I've been trying to alter the script to work on all properties of Levels (individual controls), but have so far been unsuccessful.

Any help would be appreciated.

Thanks.