Forum Replies Created

Page 78 of 1081
  • Dan Ebberts

    September 12, 2022 at 6:11 pm in reply to: Sorting returned numerical values of a ‘For Loop’

    This seems to work, but I’m not sure if it’s what you’re after:

    n = [];
    for (i = 1; i < 5; i++){
    n.push(thisComp.layer("Control").effect(i)(1));
    }
    n.sort(function(a,b){return a-b})
  • Dan Ebberts

    September 12, 2022 at 5:33 pm in reply to: Randomizing time remapping to create animated grass

    Maybe like this:

    freq = 1;
    loopTime = 3;
    mid = (key(1).time + key(numKeys).time)/2;
    t = time % loopTime;
    wiggle1 = wiggle(freq, mid, 1, 0.5, t)-valueAtTime(t);
    wiggle2 = wiggle(freq, mid, 1, 0.5, t - loopTime)-valueAtTime(t-loopTime);
    w = linear(t, 0, loopTime, wiggle1, wiggle2);
    w + mid
  • Dan Ebberts

    September 12, 2022 at 2:12 pm in reply to: Auto Orient Y only – remain parallel horizontally

    That’s a tricky one. This seems to work until the angles get too extreme (but there’s probably a better way):

    v = fromComp([1,0,0]);
    v1 = normalize([v[0],0,v[2]]);
    v2 = [1,0,0];
    radiansToDegrees(Math.acos(dot(v1,v2))) - 90
  • Dan Ebberts

    September 12, 2022 at 1:51 pm in reply to: Randomizing time remapping to create animated grass

    I guess you could limit the amplitude of the wiggle by changing the third line to something like this:

    w = wiggle(freq,mid*0.75) - value;

    but then it would never get to the extreme edges, so I’m not sure that’s what you want either.

  • I think you just need to change the order:

    temp = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
    if(temp < 0) temp=0
    [temp, temp]
  • Dan Ebberts

    September 11, 2022 at 12:49 pm in reply to: Text Command to Layer Size Expression

    I think this should work:

    x = thisComp.layer("Text Size").text.sourceText.toLowerCase();
    if (x == "small") s = 80
    else if (x == "medium") s = 90
    else s = 100;
    [s,s]
  • Dan Ebberts

    September 10, 2022 at 6:20 am in reply to: Randomizing time remapping to create animated grass

    You could try playing around with a time remapping expression like this:

    freq = 1;
    mid = (key(1).time + key(numKeys).time)/2;
    w = wiggle(freq,mid) - value;
    mid + w
  • Unfortunately, with expressions, there’s no way to do multiple styles in a single text layer. If it’s not something like color, which you can control with an Animator, you’ll have to use multiple text layers and position everything together using sourceRectAtTime(). Possible, but cumbersome.

  • Dan Ebberts

    September 9, 2022 at 5:38 am in reply to: Marker comment to text in one line

    I think so. It seems to work for me (but I may not understand what you’re asking).

  • Dan Ebberts

    September 8, 2022 at 9:46 pm in reply to: Marker comment to text in one line

    That’s interesting. Apparently, carriage returns in marker comments have both carriage return and line feed characters. Try this:

    txt = "";
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (time < marker.key(n).time) n--;
    if (n > 0){
    txt = marker.key(n).comment.replace(/\r/g, "").replace(/\n/g, " ");
    }
    }
    txt
Page 78 of 1081

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