Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions values between markers

  • values between markers

    Posted by Nino Vrana on February 10, 2015 at 6:20 pm

    hi,
    this is my problem. I have placed a set amount of markers on a null object which i have linked via Dan Ebbert’s expression (see below) to a slide control. At each marker the value increases by 1 (in whole numbers) So far so good. What I am trying to achieve though is to have an expression in place that will give me all the values between the whole numbers too, i.e. 1,1 1,2 1,3 etc… is there a way? any help is much appreciated.
    thanks

    Current expression:

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n–;
    }
    }

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n--;
    }
    }

    Nino Vrana replied 11 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 10, 2015 at 6:54 pm

    It sounds like you’re looking for something like this:


    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time) n--;
    }
    if (n > 0 && n < marker.numKeys)
    linear(time,marker.key(n).time,marker.key(n+1).time,n,n+1)
    else
    n

    Dan

  • Nino Vrana

    February 10, 2015 at 9:14 pm

    thank you so much Dan, this is exactly what I was after. Your help is much appreciated.

    Thanks.

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