Forum Replies Created

Page 122 of 1081
  • Dan Ebberts

    January 30, 2021 at 9:28 pm in reply to: Loop Wiggle expression only one axis

    I’m not sure why you ended up with a loopOut() expression, but if that’s really what you’re trying to do, it won’t work with a path. You can create your own pingpong version using valueAtTime() like this:

    if (numKeys > 1 && time > key(numKeys).time){

    t1 = key(1).time;

    t2 = key(numKeys).time;

    span = t2 - t1;

    delta = time - t2;

    seg = Math.floor(delta/span);

    t = delta%span;

    valueAtTime((seg%2) ? (t1 + t) : (t2 - t));

    }else

    value

  • Dan Ebberts

    January 29, 2021 at 9:52 pm in reply to: Random but predefined increments for counter

    I think you might have better luck if you describe in more detail what the desired result would look like–when values change, how much they change, etc. It’s hard to get much useful info from the expression you posted…

  • Dan Ebberts

    January 29, 2021 at 6:34 pm in reply to: Min & Max Values

    Could you try posting your expression again, this time in a preformatted text box (first click the Aa at the bottom, then the </>)? When you just paste it in, things get modified. For example, your error line has the wrong character for the minus sign. That might be your problem, or it might just be an artifact of the web page formatting.

  • Dan Ebberts

    January 28, 2021 at 8:37 pm in reply to: Turn on/off layer opacity with specific color value

    Colors are arrays, so I think you need to check them element by element. Also, floating point values may not match exactly, so I think I’d include a “close enough” tolerance. Something like this:

    tolerance = .001;

    yellow_color = [0.973,0.831,0.055,1];

    function compareColors(color1,color2,theTolerance){

    for (i = 0; i < color1.length; i++){

    if (Math.abs(color1[i] - color2[i]) > theTolerance) return false;

    }

    return true;

    }

    color = comp("_FF_Dark_01").layer("CHANGE_COLOR_HERE").effect("Color Control")("Color").value;

    compareColors(yellow_color, color, tolerance) ? 100 : 0

  • Maybe something like this:

    txt = thisComp.layer("text").text.sourceText;

    txt.toUpperCase().match(/A|L|Z|Y|Q/) ? 100 : 20

  • Dan Ebberts

    January 27, 2021 at 6:46 pm in reply to: Time remap (play and rewind)

    Time remapping expects values in seconds. So it might be as simple as altering your expression to something like this:

    ease(nullValue,0,360,0,framesToTime(150))

    You might also want to make sure nullValue never goes beyond the useful range:

    ease(nullValue%360,0,360,0,150)

  • Dan Ebberts

    January 22, 2021 at 12:17 am in reply to: Expression to control Channel Range (in Hue/Saturation)?

    You’re telling it to multiply two arrays. Try it this way:

    hsla = rgbToHsl(value);

    newColor = [hsla[0],hsla[1]*.5,hsla[2]*.5,hsla[3]];

    hslToRgb(newColor);

  • Dan Ebberts

    January 19, 2021 at 12:28 am in reply to: Code not working anymore

    Yeah, that line doesn’t makes sense. Because s is a slider, it wouldn’t have a time property. Maybe it was supposed to be s.key(n).time, or something like that. I found the original project (I think), and I was going to check the original code, but I don’t have a version of AE that’s old enough to open it.

  • Dan Ebberts

    January 18, 2021 at 7:43 pm in reply to: Code not working anymore

    Wow, that is some old code. I haven’t tested this, but I’ve gone through and updated the obsolete keyword syntax. Try it this way (or you could try just changing File > Project Settings > Expressions to Legacy ExtendScript) :

    pan_time = .5;

    s = thisComp.layer("POI Null").effect("Slider Control").param("Slider");

    n = s.num_keys;

    if (n==0){ //check for no keyframes

    L = thisComp.layer(s.valueAtTime(0));

    old_value = L.toWorld(L.anchorPoint);

    new_value = old_value;

    percent = 1.0;

    }else if (n==1){

    L = thisComp.layer(s.valueAtTime(0));

    old_value = L.toWorld(L.anchorPoint);

    L = thisComp.layer(s.key(1).value);

    new_value = L.toWorld(L.anchorPoint);

    percent = 0;

    if (time > s.key(1).time+pan_time){

    percent=1.0;

    }else{

    percent = (time – s.key(1).time)/pan_time;

    }

    }

  • I guess you could do it with a script, which would create keyframes for your result.

    Or you could do it with an expression that creates the result on the fly, as I described. The expression might eventually bog down though, if your comp is long.

Page 122 of 1081

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