Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions json sourceText with linewrap?

  • json sourceText with linewrap?

    Posted by Alex Weil on July 2, 2018 at 1:06 pm

    hey guys,
    im getting texts with linewraps that are displayed in my json file as a “\n” is there any way to tell after effects that it should do a linewrap at that point? i guess not but i think i ask all of you, if you got any good creative idea.
    cheers
    alex

    Alex Weil replied 7 years, 10 months ago 1 Member · 2 Replies
  • 2 Replies
  • Alex Weil

    July 2, 2018 at 1:47 pm

    okay, i think After effects cant even read the \n command

    \n\n[\”espírito de aventura\” should not be capitalised.]

    here a screenshot:
    12495_bildschirmfoto20180702um15.44.07.png.zip

  • Alex Weil

    July 2, 2018 at 3:02 pm

    too bad that here is no edit button, so you guy get a little monologue ???? sorry

    i solved it for like this


    data = footage("welcome3.jsx").sourceData;
    txt = data.name1;

    if (txt.indexOf("\n") > -1 ) {
    txt.split("\n")[0] + "\n" + txt.split("\n")[1];
    } else {txt}

    so if my text has a line wrap command \n in it, it splits it in 2 sections. dont know how to handle this if there are more than one line wraps, but for now it is enough.
    maybe you got some nice ideas for me 🙂

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