Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression result changes when I change the layer order, but it shouldn’t

  • Expression result changes when I change the layer order, but it shouldn’t

    Posted by David Cabestany on September 28, 2016 at 4:33 pm

    I have over a hundred layers that need to automatically scale to a specific size, each one has a different size, so I made a null and added a slider control for each one, I renamed the sliders 1,2,3, etc. all the way to 131.

    Then I applied the expression below and my intention is to have each slider being read using the index number of the layer, so layer number 2 will read slider 2, and so forth.

    The problem is that when I send the “xp” layer to the bottom of the stack so each new layer I create keeps the correct index number then the expression gets all weird and does not return the number assigned to the slider but something completely different, which I haven’t been able to figure out, for example: Layer 1 with the expression controller layer on top should return 61%, which is the value I assigned to the slider, but with the expression controller below the number returned is .8%

    Can anyone help me understand why the expression is not working as expected?

    Thanks in advance.

    fadeDur = thisComp.layer("xp").effect("fadeDur")("Slider");
    scl=thisLayer.index;
    s=ease(time,inPoint,inPoint+fadeDur,0,thisComp.layer("xp").effect(scl)("Slider"));
    [s,s];

    David Cabestany replied 9 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 28, 2016 at 4:39 pm

    Where is fadeDur in the xp effect stack?

    Dan

  • David Cabestany

    September 28, 2016 at 4:43 pm

    It was at the top. The moment I placed it at the bottom the expression started working correctly.
    Sorry I wasted your time Dan, but thanks a lot for your help.

    D.

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