Forum Replies Created

Page 59 of 65
  • Andrei Popa

    January 25, 2018 at 10:15 pm in reply to: Peak value calculation

    This should work.
    a =thisComp.layer("Shape Layer 1").transform.yPosition
    max = 0;
    for(i = 1;i<=a.numKeys;i++){
    if (a.key(i).time <= time) max = Math.max(max, a.key(i).value);
    }
    max

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 25, 2018 at 11:59 am in reply to: After effects Expressions

    Maybe you delete the comp/layers used in those expressions.

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 23, 2018 at 9:41 am in reply to: ScriptUI

    I think what you are looking for is in this document on page 7. However, i recommend you take a look at the whole document, plus this other one.

    Andrei
    My Envato portfolio.

  • So i guess what you are saying is that you want to use wiggle plus the position expression for the coloured rectangles. You can not have two values for an expression. After effects just takes the last value. So the first thing that came to mind was to add the wiggle to the expression on the previous line. Did that, but it moved the shape out of my screen. Wondering why it did that, i tried figuring how wiggle works. So aparently wiggle takes the raw value of the position and plays with them. Just substract the position value at the end. It seems to work. So the whole expression would be this.
    t = thisComp.layer("my_text");
    tRect = t.sourceRectAtTime(time,false);
    tUL = t.toComp([tRect.left,tRect.top]);
    tLR = t.toComp([tRect.left+tRect.width,tRect.top+tRect.height]);
    tCenter = (tUL + tLR)/2
    myRect = sourceRectAtTime(time,false);
    myUL = toComp([myRect.left,myRect.top]);
    myLR = toComp([myRect.left+myRect.width,myRect.top+myRect.height]);
    myCenter = (myUL + myLR)/2
    delta = myCenter - tCenter;
    value - delta+wiggle(10, thisComp.layer("Slider 1").effect("Slider Control")("Slider"))-transform.position

    Andrei
    My Envato portfolio.

  • Andrei to the rescue. In order to have a multiline expression between quotes, you need to use triple quotes. This should work:
    a = 1;

    fad = eval("""if (time < (inPoint + outPoint)/2){
    ease(time,inPoint,inPoint+a,0,100);
    } else 0;""")

    if(thisLayer.name == "Station"){
    fad;
    } else 0;

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 8, 2018 at 10:12 am in reply to: Atom text editor for after effects scripting

    You are a lifesaver. I fell like Smeagol receiving the ring :D. And a bonus. React package is awesome. The batch comman did not work like this though, i had to replace the HTML-code &#092; with the actual character. Just saying this, in case anyone else has the same problem. Thanks a lot man! I owe you big time!

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 4, 2018 at 3:06 pm in reply to: List of Shapes and Groups in a shape layer

    Check the scripts at redefinery.com . There is one called rd_GimmePropPath which i use daily. In order to have the names that you need, you create a shape in AE, select the circle/square/whatever and use this script. Make sure to check the Match Name in the script GUI. You can use those names to later add the objects by scripts.

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 19, 2017 at 8:13 am in reply to: bounce text effect

    Is this what you are looking for?
    delay = .03;
    myDelay = delay*textIndex;
    t = (time - inPoint) - myDelay;
    if (t >= 0){
    freq =3;
    amplitude = 100;
    decay = 6.0;
    s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
    [s,s]
    }else{
    value
    }

    The expression is not mine, I have it from a project I bought a long time ago, so I guess its an anonimous author.

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 8, 2017 at 9:15 am in reply to: Changing Scale Based on Position

    Try replacing second layer s with s = thisComp.height - (d/width)*100 or if your layer has the anchor point on the bottom,
    with s = transform.position[1] - (d/width)*100

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 7, 2017 at 9:11 am in reply to: Atom text editor for after effects scripting

    Thanks for that sir. Great information. But that is not what i was talking about. I know that you can use the Atom text editor to run scripts directly from the editor. I wasn’t talking about expression. Just like you hit that play button in Extendscript. I hope you understand what i mean.

    Andrei
    My Envato portfolio.

Page 59 of 65

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