Forum Replies Created

Page 105 of 1081
  • You can’t actually modify keyframes with expressions, but you might be able to simulate the result, depending on what you need to do. You can certainly use the timing of the keyframes to drive your expression animation, but it can get tricky if you also need to preserve the easing of your keyframes. You can probably do it if you just need to proportion the keyframe animation based on the value of your dropdown menu, but it depends on the details of how you have things set up.

  • Dan Ebberts

    November 2, 2021 at 4:41 pm in reply to: Move layer x pixels every nn frames and then stop

    This would be one way:

    tStep = framesToTime(10);

    tPause = framesToTime(10);

    tStop = framesToTime(300);

    jumpX = -200;

    t = Math.min(Math.max(time - inPoint,0),tStop);

    nSteps = Math.floor(t/(tStep+tPause));

    phase = t-((tStep+tPause)*nSteps);

    e = linear(phase,0,tStep,0,jumpX);

    value + [nSteps*jumpX + e,0]

  • Dan Ebberts

    October 26, 2021 at 10:59 am in reply to: Loop a specific 'time' instead of keyframes

    I’m sure the math is pretty straightforward, it’s just hard to picture exactly how you have it set up. Maybe you could post a screenshot that shows the keyframes and the section you want to loop.

  • Dan Ebberts

    October 26, 2021 at 12:50 am in reply to: Linking number of characters to opacity

    Hacking the global $ object to simulate global variables is a dicey operation at best and is probably doomed to fail if you change/animate the value (because of the stateless way that rendering occurs in AE). It doesn’t seem like you would need to do it in this case anyway–just have your opacity expression reference the length of the text directly.

  • Generally, if you have multiple conditions to evaluate, you can just drop the individual results into boolean variables and then evaluate them all in the final line of the expression. This is just an example, I have no idea if it actually does what you need:

    dropMenu2 = comp("ES_TITLE_CUSTOM").layer("CLOSER_CUSTOM 4").effect("PART 2")(1).value;

    splitText = thisComp.layer("EVENT NAME").text.sourceText.split('\r');

    cond1 = dropMenu2 == 3;

    cond2 = splitText.length > 1;

    (cond1 || cond2) ? 100 : 0

  • Dan Ebberts

    October 25, 2021 at 8:25 pm in reply to: Loop a specific 'time' instead of keyframes

    Hard to say exactly without seeing the details, but if you know the loop duration, you can do something like this to make it loop:

    valueAtTime(finalTime%loopDuration)

  • Dan Ebberts

    October 25, 2021 at 8:21 pm in reply to: Parenting Relative Value

    Try this:

    L = thisComp.layer("Layer A");

    P = L.toComp(L.effect("Corner Pin")("Lower Left"));

    fromComp(P)

  • Dan Ebberts

    October 24, 2021 at 12:49 pm in reply to: Finding specific effect name in each layer

    Try it this way:

    idx = 0;

    for (i = 1; i <= thisComp.numLayers; i++){

    if (thisComp.layer(i)("Effects").numProperties > 0){

    curFX = thisComp.layer(i).effect(1);

    if(curFX.name == "somefx"){

    idx = i;

    break;

    }

    }

    }

    idx

  • Dan Ebberts

    October 21, 2021 at 6:46 am in reply to: One expression that will work on one dimension or two?

    Try it this way:

    temp = thisComp.layer("Drive").effect("Drive")("Output 01");

    dim = value instanceof Array ? value.length : 1;

    dim > 1 ? [temp,temp] : temp

  • Just change the last line to this for x:

    (origin + [x,y])[0]

    and this for y:

    (origin + [x,y])[1]

Page 105 of 1081

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