Page 1 of 1

toggling layer visibility via expression control in effects panel?

Posted: May 21st, 2020, 4:23 pm
by drylightn

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.


Re: toggling layer visibility via expression control in effects panel?

Posted: June 15th, 2020, 10:37 pm
by sshahriyari
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.


Re: toggling layer visibility via expression control in effects panel?

Posted: June 16th, 2020, 7:01 am
by drylightn

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.


Re: toggling layer visibility via expression control in effects panel?

Posted: June 17th, 2020, 4:31 am
by sshahriyari
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: )


Re: toggling layer visibility via expression control in effects panel?

Posted: June 17th, 2020, 6:37 am
by drylightn

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


Re: toggling layer visibility via expression control in effects panel?

Posted: June 17th, 2020, 9:15 am
by sshahriyari
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...