Forum Replies Created

Page 10 of 1081
  • If you look at the rotation values in the graph editor, you’ll see that the lower layer is actually 5 seconds behind the upper layer.

    Just a couple of notes on your expressions. You don’t need the final variable, and you don’t need to put the result in brackets (because rotation is a one-dimensional property), so this would do for the top expression:

    initialRotation = 0;
    rotationIncrement = 10;
    initialRotation + rotationIncrement + Math.floor(time)

    and this for lower one:

    R = thisComp.layer(index-1).transform.rotation;
    R.valueAtTime(time-5);

    Also, I’m wondering if the upper rotation is actually what you meant to do or whether you needed a multiplication, like this:

    initialRotation = 0;
    rotationIncrement = 10;
    initialRotation + rotationIncrement * Math.floor(time)
  • Another possibility is to just provide a static reference point, then you don’t need to animate the null to see the effect. In this example I use the center of the comp as the reference point (p0):

    L = thisComp.layer("Null 1");
    p0 = [thisComp.width,thisComp.height]/2;
    p1 = L.toComp(L.anchorPoint)
    value + (p1 - p0)
  • If you want it track the movement of the null, you’d have to do something like this (but the point won’t move until you animate the position of the null):

    L = thisComp.layer("Null 1");
    p0 = L.toComp(L.anchorPoint,0)
    p1 = L.toComp(L.anchorPoint)
    value + (p1 - p0)
  • I think all you need is something like this:

    L = thisComp.layer("Null 1");
    fromComp(L.toComp(L.anchorPoint))
  • Dan Ebberts

    January 27, 2025 at 11:26 pm in reply to: Slider controlled position array

    If I’m understanding what you’re trying to do, I think you want something like this:

    s = effect("moveAmtN")("Slider");
    n = clamp(Math.round(s),1,numKeys);
    valueAtTime(key(n).time)
  • Dan Ebberts

    January 27, 2025 at 8:20 pm in reply to: Mask path and linear expression

    I think this is what you’re after:

    a = thisComp.layer("layer").transform.position[0];
    t = linear(a,0,100,key(1).time,key(2).time);
    valueAtTime(t)
  • Dan Ebberts

    January 27, 2025 at 3:31 pm in reply to: Font size no bigger than value

    Haven’t tested this, but something like this should work:

    a= thisComp.name.split("_")[0];
    nume = thisLayer.name + (" ") + a;
    manual = text.sourceText;
    automat = comp("data").layer(nume).text.sourceText ;
    if (effect("manual")("Checkbox") == 1) {
    txt = manual
    }else{
    txt = automat
    }
    curFontSize = style.fontSize;
    style.setText(txt).setFontSize(Math.min(curFontSize,25))
  • Dan Ebberts

    January 27, 2025 at 3:08 pm in reply to: Font size no bigger than value

    Something like this should work:

    curFontSize = style.fontSize;
    style.setFontSize(Math.min(curFontSize,25))
  • You could do something similar with the circle’s Stroke Width:

    refSize = 100;
    size = content("Ellipse 1").content("Ellipse Path 1").size[0];
    value*size/refSize
  • Depending on how you have things set up, I think you’d need a reference size to compare the current size to. Then you could use something like this:

    refSize = 100;
    size = thisComp.layer("Shape Layer 1").content("Ellipse 1").content("Ellipse Path 1").size[0];
    s = (size/refSize)*100;
    [s,s]
Page 10 of 1081

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