Skip to main content
Inspiring
October 1, 2022
Answered

Change the visibility of the composition layer using checkbox control

  • October 1, 2022
  • 4 replies
  • 995 views

Hi all!
Is it possible to change the visibility of the composition layer using the chackbox control. There is a need to disable a large number of layers with one click

This topic has been closed for replies.
Correct answer Mathias Moehl

Are you talking about expressions linking to a checkbox control? You cannot control the visibility (eyeball) of a layer with an expression. You can only link the opacity to a checkbox (like setting the opacity of the layers to 0, if the box is unchecked).

Scripts can also set the visibilty of a layer, as Mylenium mentioned.

 

4 replies

Mathias Moehl
Community Expert
Mathias MoehlCommunity ExpertCorrect answer
Community Expert
October 2, 2022

Are you talking about expressions linking to a checkbox control? You cannot control the visibility (eyeball) of a layer with an expression. You can only link the opacity to a checkbox (like setting the opacity of the layers to 0, if the box is unchecked).

Scripts can also set the visibilty of a layer, as Mylenium mentioned.

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Community Expert
October 2, 2022

If you want to turn a bunch of layers on or off in the timeline, you can add a controller null, add a Check Box Controller to the null, then go to one of the layers you want to switch off and Alt/Option-click on the Stopwatch to add this expression:

ctrl = thisComp.layer("Control").effect("Checkbox Control")("Checkbox");
if(ctrl == 0)
	100
else
	0

If the check box is not checked, the layer is visible; if it is checked, it is not. Visibility is controlled by opacity.

 

You can then select Opacity on the layer with the expression and go to Edit/Copy Expression only, then select all other layers and paste.

 

To make it easier to select all of the other layers, create a label group by clicking on the colored rectangle to the left of the layer name and then pick a new color. You can then click the label color of one of the layers and choose Select Lable Group to select all the same color layers.

 

If that is not what you want to do we need a better description of your workflow and maybe even a screenshot.

Mylenium
Legend
October 1, 2022

Outside the native layer switches there are scripts like Zorro the Layer tagger that can help with such mass operations. You may want to look it up on AEScripts.com. If you need this often, it could be worth an investment.

 

Mylenium

ShiveringCactus
Community Expert
Community Expert
October 1, 2022

Check out the Solo column.  It's the white dot next to the audio.  This turns off all other layers.