Forum Replies Created
-
As i see it, you want the increment of the revealed text to vary (wiggle) over time.
Thus, the variable you need is the “progress” (how much of the text is revealed) multiplied by the “speedMultiplier” parameter (giving you control of the overall speed of the animation).
Thus, your expression for the “Text” property turns to:
speedMultiplier = 10;
curTimer = time - thisLayer.inPoint;
progress = effect("Progress")("Slider");
enableOverwrite = effect("Use Overwrite Cursor")("Checkbox");
T = speedMultiplier*progress;
F = Math.round(curTimer % 1);if (F == 1 | (T, 0)) {
if(enableOverwrite == 1){
cursor = "_";
} else {
cursor = "|";
}
} else {
cursor = " ";
}
substr(0, T) + cursor;(curTimer is now only to determine the mode of the “cursor”)
The “progress” variable is assigned to the value of the “Progress” slider effect. It’s a strictly increasing function corresponding to how much of the text is revealed. The expression for the Progress slider effect is:
spd = effect("Increment")("Slider")
accum = 0;
for (i = timeToFrames(inPoint); i <= timeToFrames(time); i++){
accum += spd.valueAtTime(framesToTime(i));
}
value + accum*thisComp.frameDuration(that’s from Dan Ebberts, btw)
“Increment” is another slider effect, whose value is non-negative and wiggles over time. It’s expression is:
Math.abs(wiggle(1, 0.5))The actual parameters here are for you to play with, of cause.
In the end, the whole scheme makes the typing speed vary over time. -
Oleg Pirogov
November 27, 2019 at 1:52 pm in reply to: Wiggle expression triggered by multiple keyframesJust to throw in something to start with, this expression activates a fading-out wiggle for one second after each keyframe which has a non-zero speed at the moment just before it (which suppose to correspond to “change of position”):
n = 0;
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){
if (speedAtTime(key(n).time-thisComp.frameDuration/10)){
linear(time, key(n).time, key(n).time+1, wiggle(10, 100), value);
}
else{
value;
}
}else{
value;
}
-
Oleg Pirogov
November 27, 2019 at 1:28 pm in reply to: ExtendScript: Changing a value that I can’t believe is read-onlyWould you please specify the structure of the Shape Layer you run this on. Cause it works just fine for me and I can’t recreate the error.
-
Oleg Pirogov
November 25, 2019 at 5:22 pm in reply to: Creating a path or shape layer expression for mathematical functionI would do it like this:
1) Make a Null
2) Add this expression to its Position property:
t=time/10;
n=14;
x=100*((Math.cos(n*t)/t)+t);
y=100*((Math.sin(n*t)/t)+t);
[x,y]
3) Convert expression to keyframes:

4) Create a new shape layer with empty path and copypaste Null’s Position keyframes to that Path:

-
Oleg Pirogov
November 25, 2019 at 11:14 am in reply to: Letters appearing in Alphabetical Order via ExpressionYou should add an Expression Selector and use that expression for it, not Opacity.
-
The setInterpolationTypeAtKey deals with temporal interpolation, while you have auto-bezier for the spatial one. For turning a keyframe’s spatial interpolation to liner I would use setSpatialTangentsAtKey. Like this:
for (var k = 1; k<=bgAnchor.numKeys ; k++) {
bgAnchor.setInterpolationTypeAtKey(k, KeyframeInterpolationType.LINEAR);
bgAnchor.setSpatialTangentsAtKey(k, [0,0,0], [0,0,0]);
}
-
Oleg Pirogov
November 22, 2019 at 11:41 am in reply to: Import folder into After Effects CC by using ExtendScript?There’s a native script called “Smart Import” which does that – imports a folder. You may check it out and see, how folder import is realized there. “importFile” is for files (single files or sequences) only and can not be applied to a folder directly.
-
-
Hmm ok, I see. And if you alt+mouse wheel (zooming without moving the timeline cursor) – will that help?
-
>Ideally, I want to place my cursor and then use a shortcut that will automatically move the clip to that place.
Left bracket “[” moves the layer so its inPoint is at the current time – is that what you’re looking for?
