(I'm a total noob to using functions in the CK, and it's been a few years since I've touched my C++ work)
Most of it will consist of just calling setscale() on a bunch of objects, either going from 0.001 or to 1 depending on when it's called (I'd feed this number to the function I'd assume).