Forum Replies Created

Page 112 of 1081
  • Dan Ebberts

    July 22, 2021 at 5:54 pm in reply to: Moving layer to a fixed point

    Do you want it to be at [640,450] in comp space? That would be like this:

    fromComp([640,450])
  • Dan Ebberts

    July 15, 2021 at 11:35 pm in reply to: Loop undulations to length of comp

    Actually, this is a better way to do it:

    xAmp = 50; //height of undulations (pixels)

    n = 2; // number of undulations

    xFreq = n/thisComp.duration; // undulations per second

    xSpeed = 150; //speed of wave (pixels per second)

    wl = xSpeed/xFreq; //wavelength (pixels)

    phaseOffset = ((position[0]%wl)/wl)*2*Math.PI;

    y = xAmp*Math.sin(2*Math.PI*xFreq*time + phaseOffset);

    value + [0,y]

  • Dan Ebberts

    July 15, 2021 at 10:09 pm in reply to: Loop undulations to length of comp

    I think you’d need to change xFreq to something that gives you a number of complete undulations over your 7 second comp duration. Try .286

  • Once I fixed the mangled quotes and minus signs (which happens in this forum if you don’t use a preformatted text box to post code), it seems to work fine. This should be OK:

    src=thisComp.layer("Leader");

    delay = thisComp.layer("Leader").effect("Delay")("Slider");

    d = delay*thisComp.frameDuration*(index - 1);

    src.transform.xRotation.valueAtTime(time - d);

  • Try it this way:

    src.transform.xRotation.valueAtTime(time – d);

  • Dan Ebberts

    July 12, 2021 at 8:18 pm in reply to: Expression Selector: character before/after?

    Try this:

    textIndex > 1 && textIndex < textTotal ? 0 : 100
  • Dan Ebberts

    July 10, 2021 at 7:17 am in reply to: Remap start time of animation

    You should be able to drive the animation with something like this (time remapping maybe, depending on how you have things set up):

    tStart = thisComp.layer("Video").outPoint;

    Math.max(time - tStart,0);

  • Dan Ebberts

    July 8, 2021 at 6:21 pm in reply to: Get Layer of a property via expression

    It’s not elegant, but you can do something like this:

    p = thisProperty;

    while(!(p instanceof Layer)){

    p = p.propertyGroup(1);

    }

  • Dan Ebberts

    July 5, 2021 at 3:02 pm in reply to: Trigger Time Remap with a Checkbox Control

    Something like this maybe:

    n = 0;

    cb = effect("VIDEO_3")("Checkbox");

    if (cb.numKeys > 0){

    n = cb.nearestKey(time).index;

    if (time < cb.key(n).time) n--;

    }

    if (n > 0){

    cb.value ? linear(time, cb.key(n).time, cb.key(n).time + framesToTime(20),-100,0) : -100;

    }else{

    cb.value ? 0 : -100;

    }

  • I guess either you have an old version of AE, or you have File>Project Settings>Expressions set to Legacy ExtendScript. In either case, this should fix it:

    startIndex = 1;

    idx = index-startIndex+1;

    str = (idx < 10 ? "0" : "") + idx;

    comp("Text Controller").layer("layer_" + str).text.sourceText;

Page 112 of 1081

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