reference a comp by something other than name

Moderators: Disciple, zlovatt

Post Reply
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

I have an expression that links to a layer in another comp. The user can adjust values of properties in the master comp and not have to go into all the precomps. Then I am using a script to create scores of versions and the master comp gets renamed thus breaking all my expressions. I can't think of anyway to get around this other than add the expression in the script (which I would like to avoid). Any ideas?
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

The best I can come up with is to have the expressions in the pre-comp pick up the master comp name from a local text layer. Then have the script update the text in the text layer after it creates the new copies of the comps.

So your expressions would look something like this:

compName = thisComp.layer("text").text.sourceText.value;
comp(compName).layer("Purple Solid").rotation

Dan
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

That's a good idea Dan. I had a text layer in there trying to do something with thisComp.text, but it didn't work obviously. I ran into one other huge problem. My script imports the same project over and over again for versioning. All the expressions referenced a layer in my master comp. Since I did not rename the master comp in each import, I had 118 comps called "lowerthirdy". The expressions all pointed to the same "lowerthirdy" comp instead of the one it should have pointed to. After Effects desparately needs to have unique comp names if they are going to be referencing everything my name only in expressions. That or come up with another way to have the expressions not break when renaming comps.
Mylenium
Posts: 139
Joined: July 20th, 2005, 12:07 am

byronnash wrote:After Effects desparately needs to have unique comp names if they are going to be referencing everything my name only in expressions. That or come up with another way to have the expressions not break when renaming comps.
Yepp. Perhaps we should request access to AE's internal identifiers (which are always unique for each item, regardless of name)

Mylenium
[Pour Mylène, ange sur terre]
Post Reply