accessing expressions from scrpts

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
Redsandro
Posts: 108
Joined: June 25th, 2008, 4:55 pm

Hi,

I'm looking for a way to quickly replace a lot of layer references in expressions to another layer. I know javascript, and the AE help provides information on AE methods. But I did not find information on accessing/editing expressions.

Is this possible? I'd like to use app.project.activeItem.selectedLayers to traverse all properties with expressions, and go javascript replace() on it for a regular expression find-and-replace.
avi + m2t -> Vdub + DGIndex -> AE CS3 -> x264 -> Hell On Earth :mrgreen:
Mylenium
Posts: 139
Joined: July 20th, 2005, 12:07 am

Read the scripting guide again. Expressions are simply layer properties and can be added using layer.property and layer.property.expression or something like that. Still not particularly convenient, as you have to add all the extra stuff for line breaks and special characters inside the expression string...

Mylenium
[Pour Mylène, ange sur terre]
Redsandro
Posts: 108
Joined: June 25th, 2008, 4:55 pm

Just strings? Hmm.. that's easy. Somehow I missed that.
Also just replacing names won't require me to handle linebreaks. I'm lucky for now.
avi + m2t -> Vdub + DGIndex -> AE CS3 -> x264 -> Hell On Earth :mrgreen:
Post Reply