Fri, Jan 10, 10:49 PM 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: Detecting Poser shutdown in Python script ?


madz ( ) posted Thu, 21 February 2002 at 6:07 AM · edited Fri, 10 January 2025 at 8:07 PM

Hello all !

Does anyone knows way to get a notification in a python
script when poser is about to exit (via File->exit) ?
One might have a need to do some clean-up in python
before poser (and the python interpreter) is shut down...

All hints welcome!
Thanks
madz


ockham ( ) posted Mon, 25 February 2002 at 5:35 PM

I've been thinking about this. Python can detect a small number of "events", but shutdown of Poser itself is not listed among them. One thing that is among the listed events (in the PPP help file for Python) is closing the existing PZ3 file, which always happens along with a complete exit but also may happen within a session. Would that serve your purpose? And what sort of cleanup do you want?

My python page
My ShareCG freebies


madz ( ) posted Tue, 26 February 2002 at 3:29 AM

Thanks, ockham ! Yes, thats a good hint . I'm currently working on a thingy to load poser files from arbitrary locations, or, otherway round, a Win "Send To" which sends stuff to poser. v0.1 will be released the next days. Since this works with python network communication on the local host, my problem is how to shut down the networking sockets gracefully when Poser is closed. Right now, they hang around doing nothing after Poser exit, and it needs quite a while untils the OS kicks them. Thanks again, madz


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.