Forum: Poser Python Scripting


Subject: Help needed with a script to witch off all lights

jenay opened this issue on Jul 12, 2008 · 5 posts


markschum posted Sat, 12 July 2008 at 10:00 AM

I would write out the light values to a temp file , then you can read them back in later.

writing a file

myfile = "c:templightvalues.txt"
fo = file("myfile,"w")
for light in lights:
      write light.value + "n"

fo.close()
#reading a file
myfile = "c:templightvalues.txt"
fi = file(myfile,"r")
for line in fi :

set light to value from line

fi.close()