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 5041088 for AE-List@media-motion.tv; Wed, 17 Apr 2013 07:11:45 +0200 Received: from mail1.sea5.speakeasy.net (mail1.sea5.speakeasy.net [69.17.117.39]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 1B9D81EE5099 for ; Wed, 17 Apr 2013 01:19:52 -0400 (EDT) Received: (qmail 5946 invoked from network); 17 Apr 2013 05:19:51 -0000 Received: by simscan 1.4.0 ppid: 20620, pid: 9296, t: 0.2543s 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 05:19:51 -0000 From: James Culbertson Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_50AB8EA1-FC4A-48C4-8DEB-7968DF4A11D6" Subject: Re: [AE] exression: linking color to rotation? Date: Tue, 16 Apr 2013 22:19:06 -0700 In-Reply-To: To: "After Effects Mail List" References: Message-Id: <5254EAAF-EC08-4B72-9C00-258CCF43F8F9@speakeasy.net> 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=_50AB8EA1-FC4A-48C4-8DEB-7968DF4A11D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 That works. Thanks much, James On Apr 16, 2013, at 10:00 PM, Phil Spitler wrote: > 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 --Apple-Mail=_50AB8EA1-FC4A-48C4-8DEB-7968DF4A11D6 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1
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=_50AB8EA1-FC4A-48C4-8DEB-7968DF4A11D6--