• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Changing Expressions reference from relative to absolute?

Enthusiast ,
Nov 02, 2010 Nov 02, 2010

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

TOPICS
Expressions

Views

837

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 04, 2010 Nov 04, 2010

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2010 Nov 04, 2010

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines