Mailing List AE-List@media-motion.tv ? Message #48546
From: D <dow.hanson@gmail.com>
Subject: Re: [AE] exression: linking color to rotation?
Date: Wed, 17 Apr 2013 10:00:43 +0100
To: After Effects Mail List <AE-List@media-motion.tv>
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>


 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster