ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

json sourceText with linewrap?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alex Weil
json sourceText with linewrap?
on Jul 2, 2018 at 1:06:07 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


Return to posts index

Alex Weil
Re: json sourceText with linewrap?
on Jul 2, 2018 at 1:47:59 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


Return to posts index

Alex Weil
Re: json sourceText with linewrap?
on Jul 2, 2018 at 3:02:46 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 :)


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]