I'm trying to utilize custom properties to toggle the visibility of an entire collection on or off. However, when I right click on the restriction toggle for a collection in the outliner, the options to add, paste, or edit drivers do not appear.

When right clicking the toggles for viewport or render visibility on a collection, driver options do not appear.

Is there a method to control the visibility of entire collections with drivers, such as with an addon or custom scripting? Or are collections just completely unable to interact with drivers?

Here's a blend file I setup to demonstrate what I want to accomplish; the "Visbility Controller" empty contains a custom property titled "Collection Toggle". Ideally, when Collection Toggle is set to 0, the Spheres Collection will be visible, whilst when it's set to 1, the Spheres Collection will be disabled in renders and the viewport.

  • $\begingroup$ I don't think you can animate this particular property, however you can design a custom update tied to your property that loops over every object of that collection and toggles their individual visibility on or off $\endgroup$
    – Gorgious
    Jan 22 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.