Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expressions or script to hide shape groups

  • Expressions or script to hide shape groups

    Posted by Chad Specter on October 5, 2017 at 3:37 pm

    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}

    Chad Specter replied 8 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 5, 2017 at 10:49 pm

    I can’t think of any improvement over what you have. If you use expressions, each shape needs to have its own. Scripting is not set up to detect events in the AE UI.

    Dan

  • Chad Specter

    October 6, 2017 at 1:16 pm

    That is what I figured. I’ve had some luck using the comment // cacheCompareSamplesPerSecond 0 and adjusting the number. Making it 0 so it only runs the expressions once has definitely sped things up, though you give up flexibility. Hopefully Adobe will make expressions more effcient in some future release (ha ha) as I use them in almost all my projects. For anyone else wanting to improve performance I recommend reading about that comment here https://blogs.adobe.com/creativecloud/new-changed-after-effects-cc-2014/

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy