FORUMS: list search recent posts

if/else Checkbox to switch between color controls

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jano sempere
if/else Checkbox to switch between color controls
on Sep 3, 2019 at 8:03:47 am

I have path layers and need to switch between two colors for BG white and BG black.
Want to link to checkbox to take ease control but can't find right expression.








Sorry for bad embedings, don't know how to.
Thanks.

ch = thisComp.layer("color Control").effect("Logo versión")("Checkbox");
c1= thisComp.layer("color Control").effect("Color Control")("Color");
c2=thisComp.layer("color Control").effect("Color Control 2")("Color");
if (ch== 0) [c1]
else [c2]


Motiongrapher at cinestorm.es


Return to posts index

Dan Ebberts
Re: if/else Checkbox to switch between color controls
on Sep 3, 2019 at 11:43:55 am

For one thing, you need to remove the square brackets in the last two lines, like this:

if (ch== 0) c1
else c2

or even better like this:

ch ? c2 : c1

but in your question you mention "ease" which makes me think you're after something else...


Dan



Return to posts index

jano sempere
Re: if/else Checkbox to switch between color controls
on Sep 3, 2019 at 2:31:17 pm
Last Edited By jano sempere on Sep 3, 2019 at 2:36:26 pm

My mistake, I've mean "easy way to do"

Worked perfectly, many thanks Dan.

Motiongrapher at cinestorm.es


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]