Add Range to Driver Expression I'm trying to set up a driver for an object that uses an integer property from a panel in a custom addon as its data path, to basically control the visibility of the object within a range. So for example, if the slider is set to 1, make the object visible, but if its 0 or any number higher than 1 then hide it. So Far I've managed to find expressions that set up a min and max such as:
max(0, 1 - var)
but it only works until it hits it max and then it stays visible. I'm still new to expressions, what could I add to this to make it a range basically, or would it be better if its an if statement?
Thank you
You can use the expression var != 1 which will evaluate to False if var is 1 or True in any other case.
Example :