How to change mesh using driver like cgcookie cookieFlexRig?
The flex rig doesn't change the mesh, every hair mesh is in place at all times, the visibility is changed by using a mask modifier.

For each hair object, add a mask modifier, then add a driver for the invert option and set the driver calculation so that when a certain value is set the invert is the right way for each object.





A driver is a python expression that determines the value of the property being driven. In the case of controlling the mask modifier, the result should be a True or False value that inverts the mask effect. Drivers can be edited in the driver context of the graph editor.

The flexrig uses each number to "view" a different mesh object, the easy way to determine which is active is to test if a custom property is equal to the chosen number for each item. For example choice == 1 will be True when the custom property is set to 1. A custom property can be added to an object in the custom properties panel which is found in the object properties.

The driver panel looks a little different in 2.78 but it isn't hard to find the same settings - you choose single property and select the object that has the controlling property then enter the property name as if it was a dictionary key in python ["good"] into the path property, then you use the driver variable name in the scripted expression choice == 1