Skip to main content
Participant
March 24, 2025
Question

Dropdown opacity expression help. Muiltiple Items

  • March 24, 2025
  • 1 reply
  • 450 views

When I need a layers opacity to turn on for a specific dropdown item I'll sometimes use this expression:

dropdown = comp("CHOOSE LOGO HERE").layer("CHOOSE LOGO HERE").effect("Choose Station Logo")("Menu"); dropdown == 1 ? 100 : 0;

 

However, what if I need they layer opacity to be 100 for more than one dropdown item. Say == 1, 8, 22 ? 

I can't seem to figure out how to get this to work. Any help?

1 reply

Dan Ebberts
Community Expert
Community Expert
March 24, 2025

This should work:

m = thisComp.layer("CHOOSE LOGO HERE").effect("Dropdown Menu Control")("Menu");
m == 1 || m == 8 || m == 22 ? 100 : 0
Dan Ebberts
Community Expert
Community Expert
March 24, 2025

Sorry, didn't catch that you had renamed the dropdown. This is better:

m = thisComp.layer("CHOOSE LOGO HERE").effect("Choose Station Logo")("Menu");
m == 1 || m == 8 || m== 22 ? 100 : 0

 

Participant
March 24, 2025

This works! It's crazy because I feel like i've ftried this. Is their something about "m" that makes this work?  Anyways thank you!