Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Timewarp Source Frame increment script

  • Timewarp Source Frame increment script

    Posted by Cesar Delarosa on February 2, 2018 at 7:24 am

    Hello, I have been trying to write a script that will increment the value of the Source Frame in the Timewarp FX. Basically what I want to do is have a Checkbox control that when checked will have the Source Frame value increase by 1, starting at 0 from the time the checkbox is checked, when unchecked the Source Frame resets to 0. I can’t seem to find anything online remotely to what I am trying to accomplish. Any help is greatly appreciated.

    if (thisComp.layer(“Black Solid 1”).effect(“Checkbox Control”)(“Checkbox”)==1) ________
    else 0

    Cesar Delarosa replied 8 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 2, 2018 at 9:27 pm

    Try this:


    c = thisComp.layer("Black Solid 1").effect("Checkbox Control")("Checkbox");
    if (c.numKeys > 0){
    n = c.nearestKey(time).index;
    if (time < c.key(n).time) n--;
    if (n > 0){
    if (c.key(n).value){
    timeToFrames(time-c.key(n).time);
    }else{
    0;
    }
    }else{
    0;
    }
    }else{
    0;
    }

    Dan

  • Cesar Delarosa

    February 3, 2018 at 5:32 am

    OMG that is exactly what I needed. I still can’t wrap my head around the logic, but thank you so much!

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