Return-Path: Received: from mail-pa0-f50.google.com ([209.85.220.50] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5237244 for AE-List@media-motion.tv; Tue, 01 Oct 2013 21:26:18 +0200 Received: by mail-pa0-f50.google.com with SMTP id fb1so7965000pad.9 for ; Tue, 01 Oct 2013 12:26:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type:subject:date :in-reply-to:to:references:message-id; bh=LpCeqc0UUO/NcO/oX85Ncsk4bFU7NLuCpOF3lFOGjpQ=; b=Wa8Nh7xvxyHkXS+atbwBbvZHcuxlynF570o79VBURVyWtWZ3aTFcAB7GLcr30ctQ0b pc5qIwiYbvosMlQwRpvHe/UfEBk4zd3YgDqrw16QnUtGGpdUUPi+fSkFtG+igqKryJNL W8h8Y9RxHm9lZE4+b4iZKpvTReQjHrAugYaFpoPR/zwOoslWtknqOuEco6b+hHrt1sdY TXul6p6ergztqQuA/WZSIcr10/huDKcmlPa8tMPN8hOVUt8GlsYmKJmFaGdf3zYVnaut 5zQunWJ2x5YaSZD+7F5bVmJdJ5LdrEROeKfLOjeeP3lFTjec9BoWrElSqN+25X+h0mUn UtMQ== X-Gm-Message-State: ALoCoQmI1m0I5NTveUOp1i19kaOFWrP/nI8gOtQV+o3dpworKxjeqLSqzpZwPxbfzl1SjNl6d4sO X-Received: by 10.66.4.5 with SMTP id g5mr3414470pag.187.1380655601112; Tue, 01 Oct 2013 12:26:41 -0700 (PDT) Return-Path: Received: from [10.0.0.227] ([65.223.58.66]) by mx.google.com with ESMTPSA id im8sm8412030pbc.24.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Oct 2013 12:26:39 -0700 (PDT) From: Phil Spitler Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_978D1793-A4BB-4D40-B90F-F5B7904A3C33" Subject: Re: [AE] Automating line breaks or batch convert to paragraphs Date: Tue, 1 Oct 2013 12:26:37 -0700 In-Reply-To: To: "After Effects Mail List" References: Message-Id: <3E5D461B-B5A8-42E6-A316-25D8386B52B2@bonfirelabs.com> X-Mailer: Apple Mail (2.1283) --Apple-Mail=_978D1793-A4BB-4D40-B90F-F5B7904A3C33 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Ok, I just whipped up this expression that will do the trick. Create a new null layer called "control" and add a slider, this will = tell the text how many characters there are before it splits the line. Apply the following expression to the source text of your text layer. = You can also then copy the expression and paste it to all your text = layers. txt =3D text.sourceText; newTxt =3D ""; split =3D 0; splitVal =3D thisComp.layer("control").effect("Slider = Control")("Slider"); for (i=3D0; i < txt.length; i++) { newTxt =3D newTxt + txt[i]=20 split++; if (split =3D=3D splitVal) { split =3D 0 ; newTxt =3D newTxt +"\r"; } } newTxt I just tested it and it works great, my coding is not the most efficient = I'm sure but it does work. Sample project is here. https://www.dropbox.com/s/evc1v6uq2p2k841/textWrap.aep Phil Phil Spitler | Creative Technologist | Bonfire Labs | t : = 415.394.8200 m : 415.571.3139 Website | Facebook | LinkedIn On Oct 1, 2013, at 12:00 PM, Louai Abu-Osba wrote: > That's a toughy. Maybe you could have a script run through each layer = and add line breaks every x number of characters? >=20 >=20 > On Tue, Oct 1, 2013 at 12:54 AM, Chris Zwar = wrote: > Hi, >=20 > I'm having a total brain freeze and could do with some advice. > I have several hundred text layers that are currently single lines of = point text. I need to add line breaks to each of them so they will fit = into a column, each line will probably be split over 5-6 separate lines. >=20 > So: >=20 > 1) Is there a way to batch convert point text layers to paragraph text = layers and give them all the same bounding box >=20 > or >=20 > 2) Is there a animation preset I can use to automatically add line = breaks at the nearest word after every x characters? >=20 > Cheers, >=20 >=20 > -Chris >=20 >=20 >=20 > +---End of message---+ > To unsubscribe send any message to >=20 --Apple-Mail=_978D1793-A4BB-4D40-B90F-F5B7904A3C33 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Ok, I = just whipped up this expression that will do the = trick.

Create a new null layer called "control" and = add a slider, this will tell the text how many characters there are = before it splits the line.

Apply the following = expression to the source text of your text layer. You can also then copy = the expression and paste it to all your text = layers.



txt =3D text.sourceText;
newTxt =3D "";
split =3D 0;
splitVal =3D = thisComp.layer("control").effect("Slider Control")("Slider");
for (i=3D0; i < txt.length; i++) {
newTxt =3D newTxt + txt[i] 
split++;
if (split =3D=3D splitVal) {
split =3D 0 = ;
newTxt =3D newTxt +"\r";
}
}

newTxt



I just tested it and it works great, my = coding is not the most efficient I'm sure but it does work.

Sample project is here.



Phil




signature1 Phil = Spitler  |  Creative Technologist   |  Bonfire Labs  |  t : 415.394.8200  m : = 415.571.3139

Website | Facebook | LinkedIn

On Oct 1, 2013, at 12:00 PM, Louai Abu-Osba = wrote:

That's a toughy. Maybe you could have a = script run through each layer and add line breaks every x number of = characters?


On Tue, Oct 1, 2013 at 12:54 AM, Chris Zwar <chris@chriszwar.com> wrote:
Hi,

I'm having a total brain freeze and could do with some advice.
I have several hundred text layers that are currently single lines of = point text.  I need to add line breaks to each of them  so = they will fit into a column, each line will probably be split over 5-6 = separate lines.

So:

1) Is there a way to batch convert point text layers to paragraph text = layers and give them all the same bounding box

or

2) Is there a animation preset I can use to automatically add line = breaks at the nearest word after every x characters?

Cheers,


-Chris



+---End of message---+
To unsubscribe send any message to <ae-list-off@media-motion.tv>


= --Apple-Mail=_978D1793-A4BB-4D40-B90F-F5B7904A3C33--