SourceRectAtTime() Expression

    0
    0

    The new sourceRectAtTime() can get you the width and height of text and shape layers. It’s new but it’s good. If you have Ae CC 2014.2 (aka 13.2.0.0) then you can enjoy this. If you don’t have that option open and you want to make solids resize to text you should check out an older tutorial on this site.

    This tutorial also talks for a long time about expressions in general, so if you’re not into that… get out now!

    This is the expression we wrote on the size:
    s=thisComp.layer(“Hello people”);
    x=s.sourceRectAtTime(time-s.inPoint,true).width;
    y=s.sourceRectAtTime(time-s.inPoint,true).height;
    [x,y]

    This is the expression we wrote on the position:
    content(“Rectangle 1”).content(“Rectangle Path 1”).size/2

    If you have any questions just let me know in the comments.

    Download this project file:
    viaGumRoad: https://gumroad.com/l/vcTx
    via Evanabrams.com: http://evanabrams.com/sourcerectattime-expression-adobe-after-effects-tutorial/

    Twitter

    Google+
    https://plus.google.com/+EvanAbrams/

    Facebook
    https://www.facebook.com/pages/ECAbrams/193708234045591

    Website
    http://Evanabrams.com

    Suggest a tutorial topic: https://docs.google.com/forms/d/13A2eHcNQADsjyPWrrlbFTeOMqPAbqAxq07p7Alroh_w/viewform

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here