Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
thomaskiel
Topic Author
Posts: 11
Joined: Tue Mar 13, 2007 9:42 am
Location: Hannover, Germany
Contact:

Gathering position info from nested comp

Tue Jan 29, 2008 7:51 am

Hi all,

is it possible to access a layer in a nested comp and then read its position data in relation to the main comp? I need to gather something like a toComp value, which I won't get if I just address the nested comp by itself, without reference to the main comp. I'd be more than glad if I could skip motion-tracking a layer that I animated myself.

Thanks,
Thomas
 
Dan Ebberts
Posts: 318
Joined: Sat Jun 26, 2004 10:01 am
Location: Folsom, CA
Contact:

Re: Gathering position info from nested comp

Tue Jan 29, 2008 9:40 am

It's going to look something like this:

L = comp("your nested comp name").layer("your layer name");
thisComp.layer("your nested comp name").toComp(L.toComp(L.anchorPoint));

Dan
 
thomaskiel
Topic Author
Posts: 11
Joined: Tue Mar 13, 2007 9:42 am
Location: Hannover, Germany
Contact:

Re: Gathering position info from nested comp

Tue Jan 29, 2008 10:04 am

Hey Dan!

THX for the super quick answer! I tried something similar to this, but it wouldn't work. And my workaround wasn't the best one in the world either.

By the way, I'm almost done with that IK/puppet tool project I contacted you about (I just changed my last name in order to confuse people :D ). Coming along great!

Cheers,
Thomas

Who is online

Users browsing this forum: No registered users and 3 guests