Sun, Sep 22, 1:30 AM CDT

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

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: How do I get showerror/showinfo/xxx to work?


Montressor ( ) posted Tue, 16 April 2002 at 2:39 AM · edited Sun, 22 September 2024 at 1:28 AM

When I do a showerror I do not get any text in the messagebox until I kill the Python task. Is this a bug, or am I just doing something stoooopid?


ockham ( ) posted Wed, 17 April 2002 at 11:34 AM

I'm not sure what "showerror" is; I don't see it anywhere in the Python built-in functions or the Poser API. But this kind of behavior is common, especially when using the TKinter setup. Python is rather clumsy about claiming the Active Window or the keyboard Focus. For instance, when I do a "raise" command in Python, which is supposed to print an error message in a separate box, the box sometimes appears at the right time, sometimes appears only after the TKinter frame is closed, sometimes appears with no contents but fills in the contents after the Python task is closed.

My python page
My ShareCG freebies


bushi ( ) posted Thu, 18 April 2002 at 9:57 PM

You can keep things in sync better if you use the ProcessSomeEvents method placed throughout your code. You'll have to tinker a bit to find the best placement. Oh, and as an added bonus try it with out specifying the number of events to process ie.: ProcessSomeEvents() It appears that using this form lets Poser process as few or as many as it needs to before returning.


Montressor ( ) posted Sun, 21 April 2002 at 12:22 PM

OK, I have it. So no one else has to go crazy, here it is.

First, you have to create a dialog of some kind. For instance (assuming your Tk root is called 'root'):

Pmw.initialise(root=root)
Pmw.aboutversion('1.0')
Pmw.aboutcopyright('Copyright Montressor 2002.nAll rights reservered')
Pmw.aboutcontact('Yell at me')
app.aboutdialog = Pmw.AboutDialog(root,applicationname="Montressor's Poser Aid")
app.aboutdialog.withdraw()

When you want to display this puppy, you have to do this:

app.aboutdialog.show()
app.aboutdialog.focus_set()

Hope this helps someone

Montressor


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.