Forum Replies Created

Page 53 of 1081
  • Dan Ebberts

    March 4, 2023 at 1:44 am in reply to: Adding Overshoot expression to Scale expression

    I don’t think it will work, because your easeInOut expression has zero velocity at the end of the ease, and overshoot depends on incoming velocity.

  • Dan Ebberts

    March 1, 2023 at 4:46 pm in reply to: Control Scale with a Null

    Try changing this line:

    dis = length(this.position, mouse_layer.position);

    to this:

    dis = length(position, mouse_layer.position);
  • Dan Ebberts

    March 1, 2023 at 1:40 pm in reply to: MultiStyle text in one Text Layers

    An expression can’t create multiple styles in a single text layer.

  • Dan Ebberts

    February 28, 2023 at 9:04 pm in reply to: Offset keyframes randomly

    It doesn’t work to add loopOut() to the end of another expression. You have to create your own loop functionality–something like this:

    maxOffset = 10; // frames
    seedRandom(index,true);
    offset = framesToTime(random(maxOffset));
    t = time - offset;
    if (t > key(numKeys).time){
    t = (t - key(numKeys).time)%(key(numKeys).time - key(1).time);
    valueAtTime(key(1).time + t);
    }else{
    valueAtTime(time - offset);
    }
  • Something like this:

    txt = text.sourceText.value;
    if (txt.length > 36)
    txt.substr(0,35) + "..."
    else
    txt
  • Dan Ebberts

    February 27, 2023 at 5:46 pm in reply to: Expression that automates to duration

    There are a number of ways to do it, depending on how you’re doing the in/out animation. If you’re using 2 in keyframes and 2 out keyframes, you could do something like this to tie the animation to the layer’s in and out points:

    if (time < (inPoint + outPoint)/2){
    t1 = key(1).time;
    t2 = key(2).time;
    v1 = key(1).value;
    v2 = key(2).value;
    linear(time,inPoint,inPoint+t2-t1,v1,v2);
    }else{
    t3 = key(3).time;
    t4 = key(4).time;
    v3 = key(3).value;
    v4 = key(4).value;
    linear(time,outPoint-(t4-t3),outPoint,v3,v4);
    }

    If you’re animating in and out via expression, you’d have to alter those to incorporate the in and out point timing.

  • Dan Ebberts

    February 26, 2023 at 2:04 am in reply to: Value range instead of creating each individual numbers

    I don’t know how efficient it will be, but you could tidy things up a bit like this:

    p = [];
    prop = thisComp.layer("JSON")("Data")("Outline");
    n = prop.numProperties;
    for (i = 1; i <= n; i++){
    x = prop(i)("X");
    y = prop(i)("Y");
    p.push([x,y]);
    }
    createPath(p,[],[],false)
  • Dan Ebberts

    February 26, 2023 at 12:27 am in reply to: Value range instead of creating each individual numbers

    Can you post a chunk of your JSON file?

  • Dan Ebberts

    February 25, 2023 at 5:31 am in reply to: Linear Expression for the Scale Property

    The [0] gives you just the x value of the scale, which meets the requirements for the scalar value required by linear().

  • Dan Ebberts

    February 25, 2023 at 3:33 am in reply to: Linear Expression for the Scale Property

    You were close. Try it this way:

    var input = thisComp.layer("Null 30").transform.scale[0];
    linear(input,0,100,[0,0],[15,15]);
Page 53 of 1081

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