-
Pulling multiple frames from a comp via expression
Hi folks,
Someone made a wonderful expression that I have tried to use after slight modifications (in setup and not in expression) and now I want to improve it further to match my requirements. My precomp “letters” has image layers for all 26 alphabets. In the main comp I have a text layer having different alphabets as source text property at different frames and below expression works fine as long as the sourceText property is based on a single letter. Is it possible to extend the functionality of this expression so that the expression could pull and form a complete word based on text layer’s source property. This would be handy in situations where you are using vector image-based fonts.
txt = thisComp.layer(“text”).text.sourceText;
comp = comp(“letters”);
for(i=0; i<comp.numLayers;i++) {
if(comp.layer(i+1).name.toLowerCase().match(txt)) {
framesToTime(i); break;
} else 100;
}
I know this seems almost impossible, but I still feel may be there could be a workaround. I could think of using a loop to read the char values of each letter stored in sourceText property of text layer (remember this text layer has sourceText keyframes at specific intervals) but the most challenging aspect to me is to show multiple frames from that image based “letters” precomp at once. Even if this could be achieved, positioning them with some “padding” would be another challenge. So in short very difficult for me but may be guys like Dan Ebberts could find a workaround.
Your help would be much appreciated!
Syed