Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Move Layer via Layer Markers

  • Move Layer via Layer Markers

    Posted by Jacob Resch on July 20, 2018 at 7:52 am

    Hello!
    Maybe someone can help me with this here.
    I have an Expression, which moves the Layer an x-amount of pixels for every layer marker on the layer.

    But now i want to also add comments to the layer markers.
    So for example a layer marker is called “20 pixel up for -x”.
    I want to implement that the expression has a differend slider distance, duration and direction for different comments on these layer markers.
    Is that possible ?

    Thanks a lot :)!!

    sx = 50; // slide distance
    sd = 10; // slide duration

    m = thisLayer.marker;
    y = 0;
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (time < m.key(n).time) n--;
    if (n > 0){
    t = time - m.key(n).time;
    y = easeOut(t,0,sd,(n-1)*sx,n*sx);
    }
    }
    value + [0,-y]

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

    July 20, 2018 at 3:32 pm

    Definitely possible. You need to define the syntax of your marker comment text and then add some code to the expression that parses each comment to extract the parameters necessary to execute the slide.

    Dan

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