Numbers of lines in a textBox
X = thisComp.layer("Text");
X.text.sourceText.split("\r").length
Inertial Bounce Expression
amp = .1;
freq = 2.0;
decay = 2.0;
n = 0; time_max = 4;
if (numKeys > 0){ n = nearestKey(time).index;
if (key(n).time > time){ n--; }} if (n == 0){ t = 0; }else{ t = time - key(n).time; }
if (n > 0 && t < time_max){ v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t); }else{value}
Convert a point in a 3D space in a 2D space
B=thisComp.layer(«A»);
fromComp(B.toComp(cible.anchorPoint));
Maintain stroke width
value / length(toComp([0,0]), toComp([0.7071,0.7071])) || 0.001;
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
Reference Another Comp
comp(“COMP_NAME”).layer(“LAYER_NAME");
Fade in and out at beginning and end of layer / Source
fadeTime =.33;
fadeIn=linear(time,inPoint,inPoint+fadeTime, 0, 100); fadeOut=linear(time,outPoint,outPoint-fadeTime, 0, 100);
fadeIn-fadeOut;
