Forum Replies Created

Page 120 of 1081
  • Dan Ebberts

    February 25, 2021 at 12:25 am in reply to: Checkbox Triggered Position Follow Issue

    This expression makes some assumptions (which may not be correct), but it should get you headed in the right direction.

    L = thisComp.layer("Main Text");

    cb = L.effect("Top Text Follow 2")("Checkbox");

    if (cb.value){

    t = cb.numKeys > 0 ? cb.key(cb.numKeys).time : 0;

    p = L.position;

    y = p.value[1] - p.valueAtTime(t)[1];

    value + [0,y];

    }else

    value

  • Dan Ebberts

    February 24, 2021 at 10:46 pm in reply to: Auto-slide Null to position on marker

    It seems like your loop should be more like this:

    totalOffset = 0;
    for(i=1; i <= n; i++) {
    totalOffset += getContentHeight(i);
    }
  • Dan Ebberts

    February 24, 2021 at 8:27 pm in reply to: How to change / setValue of controllers via expression?

    >So there’s no way for an expression to change the value of the controller even if it’s on the same layer, right

    That’s correct, unless the expression is on that controller’s value.

    >Would you happen to have a good reading resource on how to set this up via a script?

    There are some online training courses available (some free, I think), but first you need to decide if scripting will provide a workable solution. Expressions are live and immediate, where scripts are generally run only when you initiate them. So if setting the value of the expression controller is a one-shot thing, a script might be the way to go, but if you need the value to be updated automatically based on other values, then it’s probably not the right tool.

  • Dan Ebberts

    February 24, 2021 at 8:14 pm in reply to: Auto-slide Null to position on marker

    Once you have the index of the most recent marker (n), you can use that to loop through all the comps associated with the previous markers and add up the heights + margins for the layers in those comps.

  • Dan Ebberts

    February 24, 2021 at 6:47 pm in reply to: Auto-slide Null to position on marker

    Once your expression finds the current marker, I think it needs accumulate the heights for all the layers associated with previous markers. It looks like (I apologize if I’m incorrect about this) you’re assuming the the results of the expression’s previous calculations will be available as value[1], which is not the case (expressions have no access to values they previously calculated).

  • Dan Ebberts

    February 24, 2021 at 6:38 pm in reply to: How to change / setValue of controllers via expression?

    An expression can only affect the value of the property hosting the expression. So you could only change the value of the controller with an expression applied to that controller (unless you use a script, which is a whole different story).

  • Dan Ebberts

    February 23, 2021 at 4:42 pm in reply to: Uniform Scale Wiggle

    I think the site redesign text formatting must have substituted a different character for the minus sign in line 6. Try it this way:

    freq = 1;

    amp = 110;

    loopTime = 3;

    t = time % loopTime;

    w1 = wiggle(freq, amp, 1, 0.5, t)[0];

    w2 = wiggle(freq, amp, 1, 0.5, t - loopTime)[0];

    linear(t, 0, loopTime, [w1,w1], [w2,w2])

  • Dan Ebberts

    February 23, 2021 at 1:03 am in reply to: Enable freeze frame with a checkbox control

    For one thing, time remapping wants seconds, not frames. The other part isn’t completely clear to me but it sounds like your expression needs calculate the total time the checkbox has been in the on state up to the current time. To do that you need to loop through the checkbox keyframes and add up all the segments since time zero where the checkbox was on (plus the contribution of the current, incomplete segment if the checkbox is currently on). Not too tough, but not trivial.

  • Dan Ebberts

    February 20, 2021 at 4:44 pm in reply to: Is this the best way – wiggle in 2 dimensions only

    This should work:

    w = wiggle(15,400);

    [w[0],w[1],value[2]]

  • Dan Ebberts

    February 18, 2021 at 7:20 am in reply to: How to combine 2 expressions under Source Text

    Something like this should work:

    txt = text.sourceText;

    var z = effect("Size")("Slider");

    var l = effect("Leading")("Slider");

    var t = effect("Tracking")("Slider");

    xRepeater = effect("xRepeat")("Slider");

    yRepeater = effect("yRepeat")("Slider");

    horzRepeat = txt.repeat(xRepeater);

    vertRepeat = horzRepeat + "\n";

    repeatTxt = vertRepeat.repeat(yRepeater);

    createStyle().setFontSize(z).setAutoLeading(false).setLeading(l).setTracking(t).setText(repeatTxt);

Page 120 of 1081

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