Copy link to clipboard
Copied
Is there an automated way to change an Expression's relative references (e.g., thisComp / thisLayer) to more absolute references like Comp("MyComp25").layer("MyLayer10.mov")
When I copy and paste layers that reference other layers into new comps, the expressions not surprisingly get invalidated since those layers do not exist in the new thisComp
Copy link to clipboard
Copied
Is this so easy that it should be pretty obvious to me? I swear I saw a script that did this. (But I can't remember the name)
Copy link to clipboard
Copied
It's pretty straight forward, but it's not trivial. There may be something out there already that does this, but I'm not sure where. Basically, you need something that will drill down, recursively through all the properties in a layer, see if the property can accept an experssion, see if it has an expression, and then do a text replace on "thisComp". (It doesn't seem like you'd need to worry about "thisLayer"). There are examples out there on how to do the recursive part (which is where most of the work is).
Dan