Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression language to say “any layer”

  • Dan Ebberts

    March 5, 2007 at 4:03 am

    Not directly. You can loop through all the layers though, which might give you what you’re after. What are you trying to do?

    Dan

  • Jetcityj

    March 5, 2007 at 4:26 am

    well I am trying to write this in expression langauge:

    if any layer’s scale is greater than 100
    then move left if, any layer on the right is larger,
    if not, then move right if any layer on the left is larger

  • Dan Ebberts

    March 5, 2007 at 5:53 am

    It might look something like this:

    
    
    v = value;
    for (i = 1; i <= thisComp.numLayers; i++){
      if (i == index) continue;
      if (thisComp.layer(i).scale[0] > 100){
        d = (thisComp.layer(i).scale[0] - 100) * thisComp.layer(i).width / 200;
        if (thisComp.layer(i).position[0] > position[0]){
          v -= [d,0];
        }else{
          v += [d,0];
        }
      }
    }
    v
    
    

    Dan

  • Jetcityj

    March 5, 2007 at 3:05 pm

    woah! thanks, this might take me a while to decipher, thanks for getting me started.

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