Return-Path: Received: from mail-pd0-f182.google.com ([209.85.192.182] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5237313 for AE-List@media-motion.tv; Tue, 01 Oct 2013 22:28:19 +0200 Received: by mail-pd0-f182.google.com with SMTP id r10so7743269pdi.13 for ; Tue, 01 Oct 2013 13:28: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:content-type:content-transfer-encoding :mime-version:subject:message-id:date:references:in-reply-to:to; bh=5FJvY5MKzyqIxZ5cIXYFY/qnLOjgKg5RsBct3OBvCfo=; b=eQvfR5B8LB6TqGejoXJYVK2iJCOKbyrtCSuPeDOq3qkyMtVVCJZ1zLBCQcnMeZLOoA 2N7Psj04RQUB3LNHufw3uupfqVyaCgCMgW94DqOBxRJFq9xHXsGeuy4OWgzJX64N5Acw pPanZxUHwhGuySIrRgh4bMDG6dPN40reycvsQWOMScU6GUneMz6BEpd2fAzg5858Y2ft 8vB8s76EU9EOHlMwZ1lRWsnqIZzcV3sZmyjC1aaA2aw+dnBBOR8IY13vZAfzr5Xhuww8 TOyezFy8RiZYRmqzZVkDjAf4v1qSz3H0fzSev8Ovak6/p3ZKXxxrjdK1BYaszndnP3sc yVDw== X-Gm-Message-State: ALoCoQkM7w1C/9RbWRsfgfoV/eA2151AyrMEHrkC5Yd7/wdh9hKnnbIkYVHMiAnoutf977jfX5an X-Received: by 10.68.229.2 with SMTP id sm2mr31409157pbc.68.1380659321025; Tue, 01 Oct 2013 13:28:41 -0700 (PDT) Return-Path: Received: from [10.225.176.244] (mobile-166-137-187-053.mycingular.net. [166.137.187.53]) by mx.google.com with ESMTPSA id hz10sm8580090pbc.36.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Oct 2013 13:28:39 -0700 (PDT) From: Phil Spitler Content-Type: multipart/alternative; boundary=Apple-Mail-04C79B81-1D60-4CFB-A28C-4C936871D6CA Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Subject: Re: [AE] Automating line breaks or batch convert to paragraphs Message-Id: Date: Tue, 1 Oct 2013 13:28:39 -0700 References: In-Reply-To: To: After Effects Mail List X-Mailer: iPhone Mail (11A470a) --Apple-Mail-04C79B81-1D60-4CFB-A28C-4C936871D6CA Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Ahh. Forgot about splitting words.=20 Nathan's idea seems a better way to go.=20 Phil Phil Spitler | Creative Technologist | Bonfire Labs | t : 415.394.820= 0 m : 415.571.3139 Website | Facebook | LinkedIn > On Oct 1, 2013, at 1:00 PM, Nathan Shipley wrote: >=20 > "Is there a way to batch convert point text layers to paragraph text layer= s and give them all the same bounding box?" >=20 > Not sure about batch converting them, but you can make a blank paragraph t= ext layer at the size you want and pick-whip it's source to the existing lay= er. Then it will create line breaks where there are spaces. I think Phil's= expression could break lines in the middle of words? >=20 > This could be tedious to set up, so you could duplicate your blank paragra= ph text layer and have it look at, say, the layer above it for it's source t= ext so you wouldn't have to pick-whip it every time with an expression like t= his: >=20 > pull=46rom =3D index-1; > thisComp.layer(pullFrom).text.sourceText >=20 > ... where you apply that expression to the Source Text value for your blan= k paragraph text layer and place the paragraph layer below the existing text= layer in the stack. Then it's just a matter of duplicating that layer. >=20 > Dunno. Maybe that helps? > - Nathan >=20 >=20 >> On Tue, Oct 1, 2013 at 12:26 PM, Phil Spitler wrot= e: >> Ok, I just whipped up this expression that will do the trick. >>=20 >> 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. >>=20 >> 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. >>=20 >>=20 >>=20 >> 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"; >> } >> } >>=20 >> newTxt >>=20 >>=20 >>=20 >> I just tested it and it works great, my coding is not the most efficient I= 'm sure but it does work. >>=20 >> Sample project is here. >>=20 >> https://www.dropbox.com/s/evc1v6uq2p2k841/textWrap.aep >>=20 >>=20 >> Phil >>=20 >>=20 >>=20 >>=20 >>=20 >> Phil Spitler | Creative Technologist | Bonfire Labs | t : 415.394.= 8200 m : 415.571.3139 >>=20 >> Website | Facebook | LinkedIn >>=20 >>> On Oct 1, 2013, at 12:00 PM, Louai Abu-Osba wrote: >>>=20 >>> That's a toughy. Maybe you could have a script run through each layer an= d 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 p= oint 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 l= ayers and give them all the same bounding box >>>>=20 >>>> or >>>>=20 >>>> 2) Is there a animation preset I can use to automatically add line brea= ks 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-04C79B81-1D60-4CFB-A28C-4C936871D6CA Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Ahh. Forgot about splitting words.&nbs= p;

Nathan's idea seems a better way to go. 

Phil

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


On O= ct 1, 2013, at 1:00 PM, Nathan Shipley <nshipley@gmail.com> wrote:

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

Not sure about batch converting them, but you can make a blank paragraph t= ext layer at the size you want and pick-whip it's source to the existing lay= er.  Then it will create line breaks where there are spaces.  I th= ink Phil's expression could break lines in the middle of words?
=

=
This c= ould be tedious to set up, so you could duplicate your blank paragraph text l= ayer and have it look at, say, the layer above it for it's source text so yo= u wouldn't have to pick-whip it every time with an expression like this:

=
<= span style=3D"font-family:arial,sans-serif;font-size:13px">
pull=46rom =3D= index-1;
thisComp.layer(pullFrom).text.sourceText

... where you apply that expression to= the Source Text value for your blank paragraph text layer and place the par= agraph layer below the existing text layer in the stack.  Then it's jus= t a matter of duplicating that layer.

Dunno.  Maybe that helps?
 - Nathan


On Tue, Oct 1, 2013 at 12:26 PM, Phil Spitler <phil@bonfirelabs.com> wrote:
Ok, I just whipped up this expression th= at will do the trick.

Create a new null layer called "con= trol" and add a slider, this will tell the text how many characters there ar= e 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 l= ayers.



txt =3D text.sourceText;
newTxt =3D "";
split =3D 0;
splitVal =3D thisComp.layer("control").effect("Slider Control")("Slider");<= /div>
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

<= /div>


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

Sample p= roject is here.



Phil





Phil Spitler&nb= sp; |  Creative Technologist   |  Bonfire Labs  |  t : 415.394.8200  m : 415.571.3139

Website | Facebook | L= inkedIn

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

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


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 t= ext.  I need to add line breaks to each of them  so they will fit i= nto 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 layer= s 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-04C79B81-1D60-4CFB-A28C-4C936871D6CA--