Forums › Adobe After Effects Expressions › Concatenate the texts and the styles
-
Concatenate the texts and the styles
-
Naã Clerise
January 11, 2023 at 6:21 pmHi, I’m brazilian, so sorry for my bad english.
I trying to concatenate 2 layers of text in After Effects. But I want to concatenate the texts and the styles.
For this moment I did this:txt01 = thisComp.layer("txt 01").text.sourceText; txt02 = thisComp.layer("txt 02").text.sourceText; font01 = txt01.getStyleAt(0,time).font; font02 = txt02.getStyleAt(0,time).font; txtStyle01 = createStyle().setText(txt01).setFont(font01); txtStyle02 = createStyle().setText(txt02).setFont(font02); txtStyle01 + txtStyle02
But the layer is returning
[object Object][object Object]
Using the variables separately they return the text formatted with the font correctly
-
Dan Ebberts
January 11, 2023 at 7:11 pmYour expression won’t be able to apply multiple styles to one text layer. You can concatenate the text, but all characters will end up with the same style.
Viewing 1 - 3 of 3 posts
Log in to reply.