--------------------------------
Thanks for viewing!
Get exclusive benefits or just show your appreciation with a membership at / andyfordvideo
-------------------------------
If you want to cycle through different fonts for you onscreen text, this expression will make it easy for you. First, you’ll need to make an array with all the possible fonts you want.
var fontArray=[
“Font1”,
“Font2”
];
You’ll need to have the proper font name listed. An easy way to that is to go to the expression language menu (triangle button), go to Text, and then select Font. This allows you to scroll through different fonts and font-weights. When you select one, it will import the proper font name.
With your array complete, you can type the following to select a value (font) from the array. Remember, the first item listed in an array is “0”, the second item is “1”, and so on.
style.setFont(fontArray[0]);
You’ll want to replace the number in brackets with variable for a slider control. This will help you quickly keyframe your fonts. Add a slider control to your layer. Then, create a variable, type Math.round so you can deal with whole number values that the array needs, and pickwhip to your slider control effect.
v = Math.round(effect(“Slider Control”)(“Slider”));
Now, you can replace the 0 in brackets with this variable (“v” in this instance), so the array chooses the value designated by the slider control value.
The final expression would be something like this:
var fontArray=[
"ArialMT",
“BemboStd”,
"Montserrat-Bold",
"Palatino-Italic”,
“CalibanStd”
];
v=Math.round(effect("Slider Control")("Slider"));
style.setFont(fontArray[v]);
#adobe #aftereffects #motiongraphics #vfx #expressions
Негізгі бет After Effects Tutorial - Font Change Expression
Пікірлер: 6