Forum Replies Created

Page 102 of 1081
  • Dan Ebberts

    December 9, 2021 at 7:50 pm in reply to: test

    test 2

    if (marker.numKeys > 0){

    tStart = marker.key(1).time;

    time - tStart;

    }else

    0;

  • Dan Ebberts

    December 9, 2021 at 5:36 pm in reply to: Use markers to control camera position?

    Something like this, maybe:

    Pos01 = [200,100,0];

    Pos02 = [100,200,0];

    Pos03 = [300,200,0];

    moveTime = 0.3;

    m = thisComp.marker;

    n = 0;

    if (m.numKeys > 0){

    n = m.nearestKey(time).index;

    if (m.key(n).time > time) n--;

    }

    if (n > 0){

    t1 = m.key(n).time;

    t2 = t1 + moveTime;

    if (m.key(n).comment == "Pos01"){

    ease(time,t1,t2,valueAtTime(t1),Pos01);

    }else if(m.key(n).comment == "Pos02"){

    ease(time,t1,t2,Pos01,Pos02);

    }else if(m.key(n).comment == "Pos03"){

    ease(time,t1,t2,Pos02,Pos03);

    }else{

    value;

    }

    }else{

    value;

    }

  • Dan Ebberts

    December 9, 2021 at 5:21 pm in reply to: parseInt boolean value

    I guess you could parse it with eval(), like this:

    aL = eval(thisComp.layer("orderData").text.sourceText.split(",")[3]);
  • Dan Ebberts

    December 8, 2021 at 4:52 pm in reply to: Mexican wave expression selector

    There may be training on out there for expression selectors, but I don’t recall seeing anything.

    The main thing to remember is that at each frame, the expression runs once for each character/word/line (depending on the “Based On” setting) and you use textIndex to tell the expression which one it’s currently working on. Sometimes you also need to use textTotal, which has the total number of characters/words/lines.

    One tricky thing is that textIndex goes from 1 to n, but your character index into the actual text goes from 0 to n-1 (and textIndex skips over any carriage control, so things can get out of whack if you have multiple lines).

  • Dan Ebberts

    December 8, 2021 at 4:39 pm in reply to: Use markers to control camera position?

    Yes, the expression goes on the camera’s position property. I’ve cleaned it up a little:

    Pos01 = [200,100,0];

    Pos02 = [100,200,0];

    Pos03 = [300,200,0];

    m = thisComp.marker;

    n = 0;

    if (m.numKeys > 0){

    n = m.nearestKey(time).index;

    if (m.key(n).time > time) n--;

    }

    if (n > 0){

    if (m.key(n).comment == "Pos01"){

    Pos01;

    }else if(m.key(n).comment == "Pos02"){

    Pos02;

    }else if(m.key(n).comment == "Pos03"){

    Pos03;

    }else{

    value;

    }

    }else{

    value;

    }

  • Dan Ebberts

    December 7, 2021 at 9:41 pm in reply to: Mexican wave expression selector

    Try setting your Position Animator to [0,-100,0], add an Expression Selector, and set its Amount expression to something like this:

    period = 6;

    t = (time - inPoint)%period;

    delay = .25;

    individualDelay = .15;

    myPeak = delay + (textIndex - .5)*individualDelay;

    delta = Math.abs(myPeak - t)

    y = ease(delta,0,individualDelay*2,100,0);

    [0,y,0]

  • Something like this then:

    current = Math.round(effect("Current")("Slider"));

    prev = Math.round(effect("Previous")("Slider"));

    diff = current - prev;

    if (diff < 0){

    prefix = "-";

    }else if (diff > 0){

    prefix = "+";

    }else{

    prefix = "+/-";

    }

    prefix + Math.abs(diff)

  • It’s not clear (to me at least) what you’re asking. What are you comparing against? Also, I don’t understand the “+/- 0” part at all.

  • Dan Ebberts

    December 4, 2021 at 12:28 am in reply to: Position around a circle

    Maybe like this:

    angle = effect("Angle Control")("Angle");

    r = 50; // radius

    c = [50,50]; // center

    a = degreesToRadians(angle); // angle in radians

    c + [Math.sin(a),-Math.cos(a)]*r

  • Dan Ebberts

    November 30, 2021 at 9:00 pm in reply to: Weird expression behavior, please help.

    It seems like this line:

    layerVal = layerVal.replace(/[^1-9]/g, '')

    will give layerVal a value of 1 for layer “Octagon 10”

Page 102 of 1081

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