-
Expressions or script to hide shape groups
I have a shape layer in which I have organized around 50 different shape groups with different shape elements. Currently I am controlling the visibility of each group with an expression on each transform.opacity hooked up to a slider control. The slider number selects the number of shape that should be visible. Everything is working fine by it is performance drags and when this shape layer is in a comp is slows to a crawl. I am looking for another solution to this problem. I know the issue is that I have 50 expressions of 50 different opacity layers running every frame, but I don’t see a way to optimize this. (Expression below).
Ideally I would be able to instead turn on/off the visibility on all the unused layers (the eyeball icon) or to somehow have one expression control all the opacity values. I know you can control the visibility of content items with a script, but can you have a script run automatically when manipulating a control. Can scripts act like plugins? Pointer appriciated.
if (effect("Logo Controls")("Select") == thisProperty.propertyGroup(2).propertyIndex) {100} else {0}