Driver expression problem

I don’t really know how to word my question for a search, so I didn’t come up with anything.

If I take two objects, obj1 and obj2, I assign a driver to the Y transform channel of obj1.

For the driver type I choose “Scripted Expression”.
Expression is: “var > 0” ( var greater zero )
Variable is: “var” , “Transform Channel”, “obj2”, “Y Location”

When I translate obj2 along the Y axis above zero, the expression equates to “1” so obj1 moves to position 1BU along the Y axis, when I move obj2 below zero on the Y axis the expression equates to “0” so obj1 moves to the Y axis origin (zero).

Now if I take a texture channel and add a driver to the “active” property of that texture, it is either “true” or “false”, I assume, maybe wrongfully so, that my expression “var > 0” would equate to “true” or “false” the same as it equates to “0” and “1”.

When I try to drive the “active” true/false property of a texture channel with obj2 the same as I drove obj1’s Y transform channel, it does not work.

Is there any reason that “var > 0” does not equate to a boolean true/false when used in this manner?

I should add that I also tried to drive the dvar value of the texture and the specific intensity channel in the same manner and that did not work either.

I am using 2.54.0 r31878 on Win7 64-bit.

Unfortunately, the way that drivers get created by default for non-object/object-data (i.e. materials, textures) means that they cannot get properly evaluated due to limitations in our depsgraph. So, really it’s nothing wrong with the expression you’re using :slight_smile:

See http://aligorith.blogspot.com/2010/09/rigging-faq-basics-of-new-driver-system.html

Thanks for the reply.