Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Automation in AE…

  • Automation in AE…

    Posted by Henry on August 27, 2007 at 5:26 am

    Hello,

    I have 140 different layers in one comp in AE CS3.

    Firstly, the effect I am doing, is that of the camera pull back through 140 different clips in 9 seconds.

    The first 18 layers I have already set the x,y,z.

    The other 132 layers I have just the z axis.

    Is there anyway of copying the first 18 layers properties of XY, and copying that to the remaining 132 layers.

    Bascially, each layer is on it’s own unique Z, but every 18th layer has the same X & Y.

    Making sense?

    Thankyou

    Mike Clasby replied 18 years, 8 months ago 2 Members · 3 Replies
  • 3 Replies
  • Mike Clasby

    August 27, 2007 at 9:07 am

    This seems to do what you want.

    Put this expression on Position (Copy the expression, Alt-Click the Position Stopwatch, then Paste):

    n = index % 18;
    if (n==0) n = 18;
    x = thisComp.layer(n).position[0];
    y = thisComp.layer(n).position[1];
    z = position[2];
    [x,y,z]

    Put the expression on one layer, then Edit>Copy Expression Only, then select all the other layers and Paste.

    This expression works off layer order, so your camera and lights, everything else, needs to be below the 150 layers you have (or was it 140?) that have this expression. Anyway, layer 19 will assume the x and y or layer 1 but retain it’s on z. Later 20 will use layer 2’s x and y, but retain it’s own z., etc. So every 18th layer will have the same x and y but their own (whatever you set it to) z. This expression works for me even on the first 18 layers (didn’t know % (modulus operator or remainder) would do that). They need to be 3D layers and on top of the stack, or it won’t work. I tested it on 180 layers, and it seems fine.

    If it doesn’t do what you want get back to me, this is my first foray combining index (layer order), % (modulus operator) and if.

  • Henry

    August 28, 2007 at 12:41 am

    You sir, are a genius.

    Thanks so much – works perfectly. I have no idea how you work out those expressions – nice one.

    Now to my next problem – 135 layers need to be ‘keylight’ as they are all on a green screen. I tried doing a pre-comp and doing a general keylight to them all – but it only got rid of the green screen, did not make them transparent like it normally would.

    My computer craps out when I try to a apply the effect to 130 layers!

  • Mike Clasby

    August 28, 2007 at 1:31 am

    Thanks for the compliment, that one was a challenge for me. It’s fun to get them to work.

    “…but it only got rid of the green screen, did not make them transparent like it normally would.”

    What did it replace it with? Just curious.

    I don’t keyout stuff much, so you might be better off asking a new question above.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy