Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression Request or Fix: Layer moves over time then stops at layer marker then starts again on next layer marker, with ease.

  • Expression Request or Fix: Layer moves over time then stops at layer marker then starts again on next layer marker, with ease.

    Posted by Gerald mark Soto on February 26, 2013 at 5:33 am

    Currently the expression below immediately stops when it reaches its layer marker. Requires one layer marker on the expression layer.

    m = 450;
    if (marker.numKeys > 0 && time <= marker.key(1).time){
    value + [1,0]*(time-inPoint)*m;
    }
    else{
    value + [1,0]*( marker.key(1).time-inPoint)*m;
    }

    Then this expression below does the same as above but eases into the stop, which is awesome. A good friend of mine wrote it up. Requires one layer marker on the expression layer.

    m = 450;
    startSlowDownTime = 1 //in secs
    if (marker.numKeys > 0 && time <= marker.key(1).time){
    if (time >= marker.key(1).time – startSlowDownTime) {
        t1= marker.key(1).time – startSlowDownTime;
    t2 = marker.key(1).time;
    v1 =  value + [1,0]*(t1-inPoint)*m;
    v2 = value + [1,0]*(t2-inPoint)*m;
         easeOut(time, t1, t2, v1, v2);
        } else {
            value + [1,0]*(time-inPoint)*m;
    }
    }
    else{
    value + [1,0]*( marker.key(1).time-inPoint)*m;
    }

    So my question is. I have another similar expression that moves through time and then stops when it meets a layer marker but starts moving again when it reaches the next layer marker. So what I want to know is how can I apply the ease to the the below expression like the above expression has the ease when it stops. So I want to have an ease when it stops and an ease when it starts moving again. And if possible also have an ease when it start from the beginning of the comp.Requires two layer markers on the expression layer.

    m = 450;
    if (marker.numKeys > 0 && time <= marker.key(1).time){
    value + [1,0]*(time-inPoint)*m;
    }
    if (marker.numKeys > 0 && time >= marker.key(1).time){
    value + [1,0]*(marker.key(1).time-inPoint)*m + [0,0]*(time-marker.key(1).time)*m;
    }
    if (marker.numKeys > 1 && time >= marker.key(2).time){
    value + [1,0]*(marker.key(1).time-inPoint)*m + [0,0]*(marker.key(2).time-marker.key(1).time)*m + [0,1]*(time-marker.key(2).time)*m;
    }

    Thanks All.

    Gerald mark Soto replied 13 years, 2 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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