Sat, Feb 1, 7:00 AM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Is Actor.OnOff() broken for lights?


face_off ( ) posted Wed, 29 December 2004 at 3:49 PM · edited Sat, 01 February 2025 at 4:33 AM

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


PoseWorks ( ) posted Thu, 30 December 2004 at 1:58 AM

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.


face_off ( ) posted Thu, 30 December 2004 at 2:57 PM

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


Privacy Notice

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.