FORUMS: list search recent posts

Parenting to a nested layer that loops!

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
stephen roberts
Parenting to a nested layer that loops!
on Jul 11, 2014 at 3:50:09 pm

Hi Guys!

Dan Ebberts explained how to parent to a layer within a comp:

L = comp("nestedComp").layer("layerWithinComp");
L.toComp(L.anchorPoint)

But my problem is that that comp is looping.

It's a walk cycle that lasts 1 second. It loops in the main comp. I want to add random blinking eyes that follow it.

Any thoughts?

L = comp("nestedComp").layer("layerWithinComp");
L.toComp(L.anchorPoint)


Return to posts index

Dan Ebberts
Re: Parenting to a nested layer that loops!
on Jul 11, 2014 at 4:46:13 pm

Are you doing the looping by using a loopOut() expression on a time-remapped nestedComp layer?

If so, I'd try replacing the loopOut() with a DIY version like this:

time%key(2).time

(you make need to adjust this, depending on how you have things set up)

and then use a similar time calculation to position the other layer in the outer comp:

t = time%thisComp.layer("nestedComp").timeRemap.key(2).time;
L = comp("nestedComp").layer("layerWithinComp");
L.toComp([0,0],t)


Dan



Return to posts index

stephen roberts
Re: Parenting to a nested layer that loops!
on Jul 11, 2014 at 4:54:32 pm

Wow! that works with no adjustments! Thanks much.

Of course, now I need to pick this apart and figure WHY it worked.

Thanks again!
Stephen


Return to posts index


Dan Ebberts
Re: Parenting to a nested layer that loops!
on Jul 11, 2014 at 5:06:25 pm

I did forget to change one thing back from my test version to match your version:

L.toComp([0,0],t)

should have been

L.toComp(L.anchorPoint,t)


Dan



Return to posts index

stephen roberts
Re: Parenting to a nested layer that loops!
on Jul 11, 2014 at 5:08:25 pm

thanks again!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]