Return-Path: Received: from mail-ia0-f174.google.com ([209.85.210.174] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5041071 for AE-List@media-motion.tv; Wed, 17 Apr 2013 06:51:55 +0200 Received: by mail-ia0-f174.google.com with SMTP id o25so1092122iad.33 for ; Tue, 16 Apr 2013 22:00:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=X6tUhlBuFFea0YZhwEHPGleAFwmSxwoUFRnfrO5hwmk=; b=khXA7HNtikPL0CK6Jg+/545NQ8WthlPipa3FGK7fQ6P5K3WQBPIPj06qbaUi784P4J DbIPdK9WI4NcZL1BhXQ5q3u0mjFqRYQ3U9ybST0bXlo/2spkjVNBI3aEN+XKJAryb0XA ChmuqgNYVfxLG3GAkRzi6eh/Saj0sCjw4GylcRKiZDokyr1kbBuC09f8aGs6mpPwhvG8 3n4TllunTW5q2oA8KyjGSQVmgrPvvJC+nftjLtEos4f2RZL7M6lJt7qovg93kcxMC+FW 4ZjLiIISKL7Zcn+9efUV7wejJmLZSQ4UDUuBuomhQQPobAJyaKQ71+s/BMFn12/Emohg cPig== MIME-Version: 1.0 X-Received: by 10.50.184.132 with SMTP id eu4mr2954054igc.19.1366174801115; Tue, 16 Apr 2013 22:00:01 -0700 (PDT) Received: by 10.64.12.52 with HTTP; Tue, 16 Apr 2013 22:00:01 -0700 (PDT) In-Reply-To: References: Date: Tue, 16 Apr 2013 22:00:01 -0700 Message-ID: Subject: Re: [AE] exression: linking color to rotation? From: Phil Spitler To: After Effects Mail List Content-Type: multipart/alternative; boundary=14dae9340ebdb8d0dc04da875bca X-Gm-Message-State: ALoCoQnFOy1zzhXwwHPFFmNXNCiAyY9DaO8sxH4nU3gJWSl7C3m/3QgcvTpLUabdC9NjiYK7dlC4 --14dae9340ebdb8d0dc04da875bca Content-Type: text/plain; charset=ISO-8859-1 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 > --14dae9340ebdb8d0dc04da875bca Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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>

--14dae9340ebdb8d0dc04da875bca--