Why don't you apply a shader then?
This diffuse lighting shader should be pretty much like the default mat_model material: http://www.conitec.net/shaders/shader_work2.htm
You may/ certainly have to replace the sun vectors and variables with custom vectors (that you declare and set in your script).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends