I'm having trouble with a driver. I have the driver using a single property linked to a custom property. I want the driver to turn the visibility on when the custom property's value is "1", but turn the visibility off when the value is "0" or "2". What's the best expression to achieve this?
Visibility is a boolean value of True or False that can be represented by 0 and 1 as well. You can write a statement that would evaluate to True or False as an expression when driving it.
In your case you need an expression that would evaluate as False only when your custom property is 1. This is confusing since it's False for the object to be visible and True to hide. You are actually driving
object.hide_render properties even though in the UI you usually disable a checkbox to hide and enable to show.
var != 1 will only return false when var is 1: