Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Modifying 2-D expressions to 1D values

  • Modifying 2-D expressions to 1D values

    Posted by Navarro Parker on November 19, 2012 at 10:18 pm

    I’m using Dan’s standard “Creating Trails” expression:

    delay = thisComp.layer(“Delay Null”).effect(“Slider Control”)(“Slider”); //number of frames to delay
    d = delay*thisComp.frameDuration*(index – 1);
    thisComp.layer(1).position.valueAtTime(time – d)

    And it works great for 2D position properties. But if I use the “Separate Dimensions” command, it breaks if I apply it to a “1D” property like X or Y individually. How can I modify it to work with just one dimension?

    Dan Ebberts replied 13 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    November 20, 2012 at 1:39 am

    For xPosition, for example, you could change the last line to this:

    thisComp.layer(1).transform.xPosition.valueAtTime(time – d)

    Dan

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