Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Concatenate the texts and the styles

  • Concatenate the texts and the styles

    Posted by Naã Clerise on January 11, 2023 at 6:21 pm

    Hi, 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

    Naã Clerise replied 1 year, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 11, 2023 at 7:11 pm

    Your 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.

  • Naã Clerise

    January 11, 2023 at 7:31 pm

    Understand.

    Thank you very much for your help and patience.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy