Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions easing remapped time between markers

  • easing remapped time between markers

    Posted by Bruno Lopez on November 12, 2008 at 9:56 am

    I have got 2 layers. One called “old time” with markers. The other (PreComp) has got the same number of markers but in different position and has to be time remapped using the time of the markers from “old time” layer. I can achieve it with the next code but I can’t easing the interpolation of the movement.

    if (marker.numKeys > 0){
    t=marker.nearest_key(time).index;
    t1=marker.nearest_key(time).index+1;

    s=thisComp.layer(“old time”).marker.key(t).time
    s1=thisComp.layer(“old time”).marker.key(t1).time

    if (time>=marker.key(1).time){

    ease(time,t,t1,s,s1);

    }else{

    0;

    }

    }

    Bruno Lopez replied 17 years, 9 months ago 1 Member · 1 Reply
  • 1 Reply
  • Bruno Lopez

    November 14, 2008 at 1:23 pm
    action =comp("time_remap").layer("White Solid 1");
    n = 0;
    if (marker.numKeys > 0){
      n = marker.nearestKey(time).index;
    
      if (marker.key(n).time >= time){
        n--;{
    if (n > marker.numKeys) n = 0;}
      }
    }
     
    if (n == 0){
    0
    }else{
      m = marker.key(n);
      m1 = marker.key(n+1);
      myComment = m.comment;
      myComment1 = m1.comment;
    
    c= action.marker.key(myComment).time;
    c1=action.marker.key(myComment1).time;
    d=marker.key(myComment).time;
    d1=marker.key(myComment1).time;
    
    ease(time,d,d1,c,c1);
    
    }
    
    
    

    First of all sorry for my poor experience about expressions.

    I have done a modification of Dan Ebberts’s expression “Trigerring animation with markers) for use the time of the markers from another comp layer but I am always getting an error “this property has no keyframe number xx”
    What I am doing wrong?. Is there any way the expression to stop looking for more markers than the layer has got. Thanks in advance

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