You are on page 1of 2

Useful After Effects Expressions

From this tutorial:


https://www.youtube.com/watch?v=rsW4fwscwKI&feature=youtu.be

1. Maintain stroke width


value / length(toComp([0,0]), toComp([0.7071,0.7071])) || 0.001;

Via Adam Plouff


https://battleaxe.tumblr.com/post/101945073972/maintain-stroke-weight-expression

2. Maintain scale when parented


s = [];
ps = parent.transform.scale.value;
for (i = 0; i < ps.length; i++){
s[i] = value[i]*100/ps[i];
}
s

Via JR Canest’s handy spreadsheet


https://docs.google.com/spreadsheets/d/1a3ArTUHAJwVi-ObZofvz6IfrKbSGSENlaTIRTs8pAJU/edit?pag
eId=116871612094468624414#gid=0

3.Time
Time

Or maybe
Time*50

Just time, nothing ticky

4.
+value

5​.
*-1

6. Posterize Time

posterizeTime(1);
7. LoopOut

loopOut(type = "cycle", numKeyframes = 0)


loopOut(type = "pingpong", numKeyframes = 0)
loopOut(type = "offset", numKeyframes = 0)

You don’t need to include “numKeyframes = 0”


loopOut(type = "cycle) will work too :)

8. Reference Another Comp

comp("COMP_NAME").layer("LAYER_NAME").

To reference the source test from the example in the video


comp("COMP_NAME").layer("LAYER_NAME").text.sourceText

9. Wiggle

wiggle(freq,amp);

E.g.
wiggle(1,50);

10.

math.floor()

Thank you. :)

You might also like