toggling layer visibility via expression control in effects panel?

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
drylightn
Posts: 4
Joined: May 19th, 2020, 7:31 pm

I'm trying to write a script that toggles the visiblity (eyeball) of a layer depending on if a check box is toggled in the effects panel, using AE 2020. The main gist is i'm rigging a character and want to show/hide controls depending on the options they have turned/on off. I believe i can do that with the layer("layername").enable property, but I'm not sure where to place the command to have it check to fire it off.

sshahriyari
Posts: 30
Joined: January 16th, 2017, 11:59 pm
Contact:

drylightn wrote: May 21st, 2020, 4:23 pm

I'm trying to write a script that toggles the visiblity (eyeball) of a layer depending on if a check box is toggled in the effects panel, using AE 2020. The main gist is i'm rigging a character and want to show/hide controls depending on the options they have turned/on off. I believe i can do that with the layer("layername").enable property, but I'm not sure where to place the command to have it check to fire it off.

you can do it by controlling over transparency.

drylightn
Posts: 4
Joined: May 19th, 2020, 7:31 pm

Unfortunately, that doesn't really work for me because even at 0% transparency, the layer can still be "selected" in the camera view by accident (even if you can't see it). Ultimately I've come to the conclusion that you can't control the eyeballs with expressions (in timeline), only with scripts.

sshahriyari
Posts: 30
Joined: January 16th, 2017, 11:59 pm
Contact:

drylightn wrote: June 16th, 2020, 7:01 am

Unfortunately, that doesn't really work for me because even at 0% transparency, the layer can still be "selected" in the camera view by accident (even if you can't see it). Ultimately I've come to the conclusion that you can't control the eyeballs with expressions (in timeline), only with scripts.

Hi,

download it :wink:

https://gum.co/tlv_1

( donate more than one If you enjoy :mrgreen: )

drylightn
Posts: 4
Joined: May 19th, 2020, 7:31 pm

Hi @ sshahriyari! That looks like a handy little script you got there, but not quite what I"m trying to do. Ultimately what I want is to have an effect control that is linked to an expression on the layer of whos visibility I want to toggle. So like for example, I am rigging a characteand I want to completely hide parts of the character if a checkbox is checked. (So it can't be selected in viewport by mistake). That way the animator doesn't have to launch a 3rd party script to do the toggling. It all just happens as part of the comp.
-Chad

sshahriyari
Posts: 30
Joined: January 16th, 2017, 11:59 pm
Contact:

drylightn wrote: June 17th, 2020, 6:37 am

Hi @ sshahriyari! That looks like a handy little script you got there, but not quite what I"m trying to do. Ultimately what I want is to have an effect control that is linked to an expression on the layer of whos visibility I want to toggle. So like for example, I am rigging a characteand I want to completely hide parts of the character if a checkbox is checked. (So it can't be selected in viewport by mistake). That way the animator doesn't have to launch a 3rd party script to do the toggling. It all just happens as part of the comp.
-Chad

There is no way to do this with expression (in my mind).
with this script you can set a group of layers and toggle between Show/Hide.
also you can use it in floating mode...

Post Reply