FORUMS: list search recent posts

Bake All Expressions in Comp?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Lukasz Pason
Bake All Expressions in Comp?
on Jan 19, 2015 at 9:43:08 pm

Hey Guys,
I've got 300 null objects that I need to select the orient property and bake their position. Is there a script I can run that will bake all of the expressions inside of a comp without having to select each layer individually?

Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz


Return to posts index

Dan Ebberts
Re: Bake All Expressions in Comp?
on Jan 19, 2015 at 10:34:09 pm

If it's just Orientation, I think this will work (assuming you have the comp active):


var myComp = app.project.activeItem;
for (var i = 1; i <= myComp.numLayers; i++){
myComp.layer(i).selected = false;
}
var myProp;
for (var i = 1; i <= myComp.numLayers; i++){
try{
myProp = myComp.layer(i).property("Orientation");
if (myProp.expressions != ""){
myProp.selected = true;
app.executeCommand(app.findMenuCommandId("Convert Expression to Keyframes"));
myComp.layer(i).selected = false;
}
}catch(err){
}
}



Dan



Return to posts index

Lukasz Pason
Re: Bake All Expressions in Comp?
on Jan 19, 2015 at 10:41:21 pm

Worked like a charm. Thank you Dan! I can use this with any property, yes? What a time saver!

Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz


Return to posts index


Dan Ebberts
Re: Bake All Expressions in Comp?
on Jan 19, 2015 at 10:48:32 pm

>I can use this with any property, yes?

Well, you'd have to edit the property name in the script. Having it work for any property with an expression would require a more complex script.

Dan



Return to posts index

Lukasz Pason
Re: Bake All Expressions in Comp?
on Jan 19, 2015 at 10:49:39 pm

Thanks again Mr. Mad Scientist. =)

Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]