Return-Path: Received: from qmta01.emeryville.ca.mail.comcast.net ([76.96.30.16] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 4850475 for ae-list@media-motion.tv; Tue, 18 Sep 2012 17:00:12 +0200 Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta01.emeryville.ca.mail.comcast.net with comcast id 0cdi1k00S1zF43QA1f1fLh; Tue, 18 Sep 2012 15:01:39 +0000 Received: from sz0031.ev.mail.comcast.net ([76.96.40.137]) by omta24.emeryville.ca.mail.comcast.net with comcast id 0f1e1k00c2xZMJ48kf1eGs; Tue, 18 Sep 2012 15:01:38 +0000 Date: Tue, 18 Sep 2012 15:01:38 +0000 (UTC) From: Dan Ebberts To: After Effects Mail List Message-ID: <282764463.137201.1347980498718.JavaMail.root@sz0031a.emeryville.ca.mail.comcast.net> In-Reply-To: Subject: Re: [AE] reusing a very large expression MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_137200_1450988897.1347980498695" X-Originating-IP: [::ffff:192.247.64.251] X-Mailer: Zimbra 6.0.13_GA_2944 (ZimbraWebClient - FF3.0 (Win)/6.0.13_GA_2944) ------=_Part_137200_1450988897.1347980498695 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 ----- Original Message ----- 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. ------=_Part_137200_1450988897.1347980498695 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
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" <dotsandlines@gmail.com>
To: "After Effects Mail List" <AE-List@media-motion.tv>
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.
------=_Part_137200_1450988897.1347980498695--