Forum Replies Created

Page 140 of 1081
  • Dan Ebberts

    June 4, 2020 at 4:12 pm in reply to: Wiggle the String/Number in a Text Layer

    You can just borrow a convenient property, like rotation, wiggle that, then subtract out its value:

    parseFloat(text.sourceText)+ rotation.wiggle(1,100) – rotation

    Dan

  • Dan Ebberts

    June 4, 2020 at 3:20 pm in reply to: Position Coordiates from Child

    Yes, for lights (or cameras) you’d want to do it like this:

    L = thisComp.layer(“Light 1”);
    L.toComp([0,0,0])

    Dan

  • Dan Ebberts

    June 4, 2020 at 1:54 pm in reply to: Position Coordiates from Child

    Like this:

    L = thisComp.layer(“Null 3”);
    L.toComp(L.anchorPoint)

    Dan

  • The only thing I can think of would be to turn off auto orient and use this rotation expression instead:


    v = position.velocity;
    if (length(v) == 0){
    t = time - thisComp.frameDuration;
    while (t > inPoint){
    v = position.velocityAtTime(t);
    if (length(v) != 0) break;
    t -= thisComp.frameDuration;
    }
    }
    radiansToDegrees(Math.atan2(v[1],v[0]))

    Dan

  • Something like this should be close:


    amp = 100;
    freq = 1;
    maxRun = 5;
    minRun = 1;
    maxHold = 5;
    minHold = 1;
    tPrev = t = inPoint;
    seedRandom(index,true);
    accumPrev = accum = curRun = 0;
    while (t <= time){
    curRun = random(minRun,maxRun);
    curHold = random(minHold,maxHold);
    tPrev = t
    accumPrev = accum
    accum += curRun
    t+= curRun + curHold;
    }
    if (time - tPrev < curRun)
    wiggle(freq,amp,1,0.5,accumPrev + time - tPrev)
    else
    wiggle(freq,amp,1,0.5,accumPrev + curRun);

    Dan

  • Dan Ebberts

    June 2, 2020 at 7:25 pm in reply to: Multiple if/else expressions for one value

    You would generally use else if to combine them. I’m not sure if this is the logic you had in mind, but this would be one way to combine them:


    if (thisComp.layer("Percentage 2").content("Trim Paths 1").end==0)
    0
    else if (thisComp.layer("EXTRACT PIECE").effect("3 Extract Z")("Slider")==1-59)
    0
    else
    100;

    Dan

  • Dan Ebberts

    May 31, 2020 at 10:37 pm in reply to: sourceRectAtTime driving X position

    It’s hard to say without seeing your setup exactly, but you should be able to use the index provided by the dropdown to select the correct layer in the precomp and then use sourceRectAtTime() to get the width of that layer:

    idx = thisComp.layer(“Controls”).effect(“Logo”)(“Menu”).value;
    w = comp(“precomp”).layer(idx).sourceRectAtTime(time,false).width

    Dan

  • Dan Ebberts

    May 31, 2020 at 6:33 pm in reply to: Moving keyframes timing sliders

    I think it would be like this:


    dur = effect("Duration")("Slider")*thisComp.frameDuration;
    holdTime = effect("Hold Time")("Slider")*thisComp.frameDuration;
    t1 = inPoint;
    t2 = t1 + holdTime;
    t3 = t2+dur;
    t4 = t3+holdTime;
    if (time < t2)
    t = linear(time,t1,t2,key(1).time,key(2).time)
    else if (time

    Dan

  • Dan Ebberts

    May 31, 2020 at 5:44 pm in reply to: Moving keyframes timing sliders

    I think it would be something like this:

    dur = effect(“Duration”)(“Slider”)*thisComp.frameDuration;
    holdTime = effect(“Hold Time”)(“Slider”)*thisComp.frameDuration;
    t1 = inPoint + dur;
    t2 = t1 + holdTime;
    t = linear(time,t1,t2,key(1).time,key(2).time);
    valueAtTime(t)

    Dan

  • Dan Ebberts

    May 28, 2020 at 9:37 pm in reply to: Follow the Leader Y Position

    Maybe like this:

    delay = 5; //number of frames to delay
    d = delay*thisComp.frameDuration*(index – 1);
    p = thisComp.layer(1).position.valueAtTime(time – d);
    [value[0],p[1]]

    Dan

Page 140 of 1081

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