Return-Path: Received: from asbnvacz-mailrelay01.megapath.net ([207.145.128.243] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 5041739 for AE-List@media-motion.tv; Wed, 17 Apr 2013 17:41:30 +0200 Received: from mail1.sea5.speakeasy.net (mail1.sea5.speakeasy.net [69.17.117.39]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 164131EE50E1 for ; Wed, 17 Apr 2013 11:49:38 -0400 (EDT) Received: (qmail 8340 invoked from network); 17 Apr 2013 15:49:37 -0000 Received: by simscan 1.4.0 ppid: 5798, pid: 19777, t: 0.2808s scanners: clamav: m: Received: from c-67-185-28-214.hsd1.wa.comcast.net (HELO [192.168.1.125]) (albion@[67.185.28.214]) (envelope-sender ) by mail1.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 17 Apr 2013 15:49:37 -0000 From: James Culbertson Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_AA8C142F-47B5-4EEF-9CE5-1F0BF1DC794F" Subject: Re: [AE] exression: linking color to rotation? Date: Wed, 17 Apr 2013 08:48:55 -0700 In-Reply-To: To: "After Effects Mail List" References: Message-Id: X-Mailer: Apple Mail (2.1283) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail1.sea5 X-Spam-Level: X-Spam-Status: No, score=0.1 required=8.0 tests=HTML_50_60,HTML_MESSAGE autolearn=disabled version=3.0.4 --Apple-Mail=_AA8C142F-47B5-4EEF-9CE5-1F0BF1DC794F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 That is correct... when applied to an animatable color parameter. James On Apr 17, 2013, at 2:00 AM, D wrote: > So this expression changes a layer's colour based on its rotation = angle?=20 >=20 > On Wednesday, April 17, 2013, James Culbertson wrote: > That works. >=20 > Thanks much, >=20 > James >=20 >=20 > On Apr 16, 2013, at 10:00 PM, Phil Spitler wrote: >=20 >> I think you need an =3D=3D instead if =3D >>=20 >> if (r =3D=3D 0) color2/255 else color1/255 >>=20 >> Phil >>=20 >>=20 >> On Tue, Apr 16, 2013 at 9:52 PM, James Culbertson = wrote: >> I am trying to modify this expression, which works: >>=20 >> color1 =3D [204,0,0,255]; // shade of red + alpha >> color2 =3D [0,204,0,255]; // shade of green + alpha >> r =3D thisComp.layer("shape").transform.rotation; >> if (r > 0) color2/255 else color1/255 >>=20 >> To this expression, which does not (only the =3D sign in the last = line is different): >>=20 >> color1 =3D [204,0,0,255]; // shade of red + alpha >> color2 =3D [0,204,0,255]; // shade of green + alpha >> r =3D thisComp.layer("shape").transform.rotation; >> if (r =3D 0) color2/255 else color1/255 >>=20 >> Any suggestions on how to proceed? >>=20 >> Thanks, >>=20 >> James >>=20 >>=20 >> +---End of message---+ >> To unsubscribe send any message to >>=20 >=20 --Apple-Mail=_AA8C142F-47B5-4EEF-9CE5-1F0BF1DC794F Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1
That is correct... when applied to an animatable color parameter.

James


On Apr 17, 2013, at 2:00 AM, D wrote:

So this expression changes a layer's colour based on its rotation angle? 

On Wednesday, April 17, 2013, James Culbertson wrote:
That works.

Thanks much,

James


On Apr 16, 2013, at 10:00 PM, Phil Spitler wrote:

I think you need an == instead if =

if (r == 0) color2/255 else color1/255

Phil


On Tue, Apr 16, 2013 at 9:52 PM, James Culbertson <albion@speakeasy.net> wrote:
I am trying to modify this expression, which works:

color1 = [204,0,0,255]; // shade of red + alpha
color2 = [0,204,0,255]; // shade of green + alpha
r = thisComp.layer("shape").transform.rotation;
if (r > 0) color2/255 else color1/255

To this expression, which does not (only the = sign in the last line is different):

color1 = [204,0,0,255]; // shade of red + alpha
color2 = [0,204,0,255]; // shade of green + alpha
r = thisComp.layer("shape").transform.rotation;
if (r = 0) color2/255 else color1/255

Any suggestions on how to proceed?

Thanks,

James


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



--Apple-Mail=_AA8C142F-47B5-4EEF-9CE5-1F0BF1DC794F--