Copy link to clipboard
Copied
So I'm creating a text animation where every 8 frames, the font changes using a hold source text keyframe. It rotates between four different fonts before starting over. Something to note as well is that this isn't all one text box; in fact there's 15 letters that are all separate text layers. The reasoning for this is that each text layers has it's own dynamic shakes and movements going on. I wanted to custom arrange all of the letters to make them look off-kilter and jumbled together, rather than if they all shared a text box.
However, the total time of the animation lasts 20 seconds, and currently I have a keyframe every 8 frames for every single change for every single character (in short, too many keyframes is my issue). The issue that I'm running into is that if I want to change the live text settings, such as font size, I would have to apply it to every source text keyframe. I've tried several methods outside of expressions to loop the text but they require too much work each time to go back and change every keyframe by hand.
Basically I'm trying to avoid:
I've tried using the loopOut expression for the source text keyframes, but it doesn't seem to have an effect. The text doesn't change as if there was no expression in the first place. I'm still new with expressions, but none of the expressions help forums i've found deal with the repetition of source text keyframes. I've also heard that this could be because source text is not a numerical value and it's a path (or something, sorry if this is wrong).
If anyone has a solution that's an expression or doesn't require copying and pasting and many tedious keyframes, it would be greatly appreciated. Apologies again for my non-techincality on the matter. Thanks.
Copy link to clipboard
Copied
loopOut() doesn't work on compound keyframe data of any type, because there is no genuine interpolation to begin with and the function has no way of dealing with an arbitrary number of data streams containing arbitrary data sets. You would see the same behavior with other such properties as well. Otherwise you could ycle through fonts using setStyle() text style expressions and create the math using a modulus. Making this up on the fly, so no guarantees, but you may get the gist:
myFonts=["Font A","Font B", "Font C", "Font D"];
curFont=myFonts[Math.floor((time/framesToTime(8))%myFonts.length);
setStyle(curFont)
Short explanation: You pick a font from a pre-defined array by dividing time into slices and checking the current segment with a modulus against the array's length, which simply resets and loops once it exceeds the available number of array entries. As already said, start by reading the online help on text style expressions and look up some references on the things I explained. I'm pretty sure I messed up and this won't work right out of the gate, but should sufficiently give you an idea on how to approach your problem.
Mylenium
Copy link to clipboard
Copied
Thank you, I'll look more into those expressions, and give it a try. Appreciate it!