Control Mist Using Python

Hey. I’m working on some underwater type shaders and it’s all going great except I can’t seem to control the mist settings using python. I’ve looked at some really old threads (dated 2003 etc.), and the example blend I found no longer existed. I found lots of bits of code that should, in theory work, but none of it does.

Here’s what I’ve got:

import Rasterizer

Rasterizer.setMistStart(10) 
Rasterizer.setMistEnd(30)

Now, I have the logic set up so that when you press “One” it activates this python script. In the threads I found it said to remove any worlds attached to the scene in the world tab. I’ve done this and I still have absolutely no change when I activate the python script. There are no errors in the console.

So, is it even possible to do this? Seems like a pretty important feature to be missing (or bug). Thanks.

Sorry for the bump, but if no one can help with the controlling of the default fog, could someone help me out with making new fog using a 2d filter? I know it can be done. Thanks.