Return-Path: Received: from mail-wg0-f45.google.com ([74.125.82.45] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5041288 for AE-List@media-motion.tv; Wed, 17 Apr 2013 10:52:36 +0200 Received: by mail-wg0-f45.google.com with SMTP id l18so1304335wgh.0 for ; Wed, 17 Apr 2013 02:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=OQJIc0+ukkK/fADF8VP0Djtr60Rsnwi1PQsP0QYyS7U=; b=D7tDHagwpft7Tl8wtv1OQVyq1UuqeDUeTFKXtm+uKfzKaVBQn9AXo/D8aUgFzucYhg 9GTpEk72L4iGXMl48g27i+jZxJB0F69EeJ3jhMNdtlib26lktPwTvbcAL5IRKn2YGodM ayHxr2u67PsgimUGCluxzfsX09rCQkqKfeIJMksETP3OdMt/WEu0fNFK45PDHGeyCyiG zU2EzhHnJAhkcCzlY8tNNiDZcaw91gBbhHY7+uztQ8/4BxAcyKrQtlD0YpKMCcqvZM+N pOSVqK2U4MSffzUb1IV4mvir6wbpZC5Ys8sZIBIn4AAoq+NwMm0TAy8lQS09VSJqTAZQ LCsw== MIME-Version: 1.0 X-Received: by 10.194.104.168 with SMTP id gf8mr9536139wjb.58.1366189244039; Wed, 17 Apr 2013 02:00:44 -0700 (PDT) Received: by 10.217.86.201 with HTTP; Wed, 17 Apr 2013 02:00:43 -0700 (PDT) In-Reply-To: References: Date: Wed, 17 Apr 2013 10:00:43 +0100 Message-ID: Subject: Re: [AE] exression: linking color to rotation? From: D To: After Effects Mail List Content-Type: multipart/alternative; boundary=089e0102ee069648c804da8ab873 --089e0102ee069648c804da8ab873 Content-Type: text/plain; charset=ISO-8859-1 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 > > 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 >> > >> > > > --089e0102ee069648c804da8ab873 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable So this expression changes a layer's colour based on its rotation angle= ?=A0

On Wednesday, April 17, 2013, James Culbertson wr= ote:
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

if (r =3D=3D= 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 =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

To this expression, which does not (only the =3D sign in the last line is d= ifferent):

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

Any suggestions on how to proceed?

Thanks,

James


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


--089e0102ee069648c804da8ab873--