SourceRectAtTime() Expression- Adobe After Effects tutorial @ECAbrams
SourceRectAtTime() Expression- Adobe After Effects tutorial  @ECAbrams
Uploaded February 2015 | Updated November 2026, 1 hour ago
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: gumroad.com/l/vcTx
via Evanabrams.com: evanabrams.com/sourcerectattime-expression-adobe-after-effects-tutorial

Twitter
Twitter.com/ecabrams

Google+
plus.google.com/+EvanAbrams

Facebook
facebook.com/pages/ECAbrams/193708234045591

Website
Evanabrams.com

Suggest a tutorial topic: docs.google.com/forms/d/13A2eHcNQADsjyPWrrlbFTeOMqPAbqAxq07p7Alroh_w/viewform
SourceRectAtTime() Expression- Adobe After Effects tutorialMograph Brunch Aug 22 - Lite DeformationMotion Design Hotline - With Guest Ben MarriottMotion Design Hotline - Season 2 FinaleFalling In Adobe After EffectsLong Shadows (with the repeater) - Adobe After Effects tutorialDynamically Resizing Line of Shapes - Adobe After Effects tutorialMograph Brunch Aug 9 - CC Sphere? Here? Oh, dear.Adobe CC Woes - Vlog 1Chromatic Aberration Template - TrailerReact to Audio in Adobe After EffectsThe Wiggly Selector (Text Animator) - Adobe After Effects tutorial
ECAbrams |

SourceRectAtTime() Expression- Adobe After Effects tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER