Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Actor.OnOff() refers to whether or not the actor representing the light is displayed in the scene, not whether or not the light is turned on. Since Poser's global lights don't display by default, you're getting zero for all of them. As far as I know, there's no way to directly query whether a light is turned on or off. (Unfortunately, you can't access it as a Parameter either.) You would have to use Scene.SaveLibraryLight() and then collect the information from the LT2 file.
Thanks PoseWorks - that makes sense. Saving to a light library is probably too much hassle for what I need to do. Thanks for your reply.
Creator of PoserPhysics
Creator
of OctaneRender
for Poser
Blog
Facebook
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Hi All I print str(Actor.OnOff()) for each light in my scene (some being on, and some off), and each light prints "0" (so the method is returning 0 regardless of the light state). Anyone else noticed this? Am I doing something wrong, or is it a P5 glitch?
Creator of PoserPhysics
Creator of OctaneRender for Poser
Blog
Facebook