(FKIK Switch) How to make a driver run an operator when it's at a certain value?

I’m making an FKIK switch. I want to make it so that when the animator drags the driver value to 1.0, an operator runs that hides the FK controls and shows the IK controls. I already have the operator and the driver setup, but I don’t know how to connect the two in this way.
Screenshot_100

I would think you could do this with a py driver. Basically it’s a python script that is executed when the driver changes values.

Here’s an example for 3.6.5, should work in 4.0 too…
py_driver_example1.blend (888.8 KB)
When you open the file, run the script that is in the text editor, then update dependencies in the driver editor, then hit the space bar. Basically, it will move suzanne up on the z-axis as far as the cube is moved.

Feel free to ask questions,
Randy

3 Likes