I was considering using the math node but started thinking that you probably don’t want to exponentially increase/decrease the alpha channel which would lead to further complications in the node setup.
Anyhoo, I also make a gamma texture node in c and submitted it to the patch tracker which should be just as fast (without the alpha channel complications) as the math node. Probably make a material one as well since it is just simple changes.
I am actually trying to use your script right now and am getting a ‘not a valid dynamic node Python script’ error message when I do. I have a new thread started herehttp://blenderartists.org/forum/showthread.php?t=172021 about it. As I am not a Python coder I can’t tell what is wrong with the code.
Actually, after testing your script, I may be onto something here.
When your script is left set at 1 it works fine, but has no effect (which I assume is normal?).
However, when I set the Gamma to anything other than 1.00 I get the same error message with your script that I got with the other one. Which means I may have a bigger issue and both scripts may be fine.