Return-Path: Received: from mail-vb0-f41.google.com ([209.85.212.41] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 4850574 for AE-List@media-motion.tv; Tue, 18 Sep 2012 17:53:38 +0200 Received: by vbkv13 with SMTP id v13so8619309vbk.28 for ; Tue, 18 Sep 2012 08:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=8isWPFxpvg+N7gY/3mqGfhzgiSXhXBeHPcvYWWXM5i4=; b=VETUgIqJGmg89GljqfLJJhHpoWD+HAjDVdKjDNEHyXRKUtg353AkA+8hkUqQjpgJSb A5PcgAGQDWtWLB0k/ocFDi1368UT2WtnBBTeLY6/AXf+0EqwBs87SjlHBJ0miXAEOx2o +Dsxddl1O/X5f7lznpBKIR6cGVSej9M9JfZ2jpcSPOorZA/m+8MUarlHgkOjTDo/lAei nPLuvgAbhIw7wQgthz7IB/MFYdRTX5UFnXW6e/SJKgcClFuxhYhmXrAeS6ROnV+vpxS7 glVJUpVUqOlESZYULsthwSTsZSW8pYbURfOJodzT9Itor4MZ8qZyp5fJ/pbGEOcCAZSR wkRQ== MIME-Version: 1.0 Received: by 10.52.92.11 with SMTP id ci11mr188432vdb.7.1347983705152; Tue, 18 Sep 2012 08:55:05 -0700 (PDT) Received: by 10.58.91.141 with HTTP; Tue, 18 Sep 2012 08:55:05 -0700 (PDT) In-Reply-To: References: Date: Tue, 18 Sep 2012 10:55:05 -0500 Message-ID: Subject: Re: [AE] reusing a very large expression From: Drew Gilmore To: After Effects Mail List Content-Type: multipart/alternative; boundary=20cf3071ce0ae89e7904c9fbe96b --20cf3071ce0ae89e7904c9fbe96b Content-Type: text/plain; charset=ISO-8859-1 Thanks Dan (and thanks Angie too!) It took a bit to figure out I needed to pull out comments and white space out of the big expression, and surround the whole thing with quotes, but it's all working now. Drew On Tue, Sep 18, 2012 at 10:01 AM, Dan Ebberts wrote: > You could paste the expression into a text layer and then do something > like this: > > expr = thisComp.layer("expression text").text.sourceText.value; > eval(expr); > > > > Dan > > ------------------------------ > *From: *"Drew Gilmore" > *To: *"After Effects Mail List" > *Sent: *Tuesday, September 18, 2012 7:21:08 AM > *Subject: *[AE] reusing a very large expression > > > HI all, > > I'm trying to find a way to manage the use of a large expression (roughly > 200 lines of matrix math fun that I barely understand, but hey it works!) > > Instead of pasting the entire expression into every layer that I need, I'm > linking to it with a line like this: > > $.evalFile ("Y:/project/crazymath.txt") > > And then adding a few additional expressions afterwards, which use the > functions in the linked file. > > This works well, except it's not very portable. Is there a way to keep > that large expression internal to the .aep file, but not have paste the > whole mess everywhere I need it? > > Drew > -- > Drew Gilmore > newtonscannon.com > > Just a guy made of dots and lines. > --20cf3071ce0ae89e7904c9fbe96b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Dan (and thanks Angie too!)

It took a bit to figure out I nee= ded to pull out comments and white space out of the big expression, and sur= round the whole thing with quotes, but it's all working now.

Drew


On Tue, Sep 18, 2012 at 10:01 AM= , Dan Ebberts <debberts@comcast.net> wrote:
You could paste the expression into a text layer and then do somet= hing like this:

expr =3D thisComp.layer("expression text").text.sourceText.va= lue;
eval(expr);



Dan


From: "Drew G= ilmore" <dotsandlines@gmail.com>
To: "After Effects Mail List" <AE-List@media-motion.tv>
= Sent: Tuesday, September 18, 2012 7:21:08 AM
Subject: [AE] re= using a very large expression


HI all,

I'm trying to find a way to manage the use of a= large expression (roughly 200 lines of matrix math fun that I barely under= stand, but hey it works!)

Instead of pasting the entire expression i= nto every layer that I need, I'm linking to it with a line like this:
$.evalFile ("Y:/project/crazymath.txt")

And then addin= g a few additional expressions afterwards, which use the functions in the l= inked file.

This works well, except it's not very portable. Is t= here a way to keep that large expression internal to the .aep file, but not= have paste the whole mess everywhere I need it?

Drew
--
Drew Gilmore
newtonscannon.com

Just a guy made of dots and line= s.

--20cf3071ce0ae89e7904c9fbe96b--