Thu, Nov 28, 9:00 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 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: Creating a wxPython dialog in P9


PickledPapaya ( ) posted Tue, 23 October 2012 at 12:45 PM · edited Thu, 28 November 2024 at 7:59 AM

OK, so I am trying to make a interface in P9 for a script, and since its P9, I was going to try a simple sample.

Here is the sample, I got, and I added "poser" to the import line.

When I run it, the dialog shows, but Poser goes white, and when I close the dialog, Poser crashes. 

Any thoughts here?  I was hoping for a "this is so simple, you can learn from here" type of script, but seems like I picked the wrong one.

SCRIPT I used: http://www.wxpython.org/test7.py.html

PAGE it is linked from (2nd screenshot down): http://www.wxpython.org/screenshots.php


PickledPapaya ( ) posted Tue, 23 October 2012 at 1:25 PM

OK, I found a small sample script from PhilC HERE

That should get me started...it works, and should get me started.  1st item, find out why it says "running in poser 8"  ;-)


grichter ( ) posted Tue, 23 October 2012 at 4:05 PM

Quote - OK, I found a small sample script from PhilC HERE

That should get me started...it works, and should get me started.  1st item, find out why it says "running in poser 8"  ;-)

 

You sill see it says maybe 10 lines from the top

print "Running in Poser 8"

Print is the command to ahh print data on you screen. Change that line between the quotes to read "Priniting Money" (snicker) or anything you like.

 

Gary

"Those who lose themselves in a passion lose less than those who lose their passion"


grichter ( ) posted Tue, 23 October 2012 at 4:08 PM

FYI PhilC has an set of fantastic tutorials with sample scripts for you to edit and so forth to do what you want to do in tinker and wxpython.

 

I have used the examples as a foundation to create a new script in many times. Well worth the cost.

Gary

"Those who lose themselves in a passion lose less than those who lose their passion"


PhilC ( ) posted Tue, 23 October 2012 at 5:20 PM

Yes, the point was to make the distinction between running as a stand alone and running as a script within Poser.

You may find these links helpful.

forum

Comprehensive Poser Python manual


PickledPapaya ( ) posted Tue, 23 October 2012 at 5:30 PM

Quote - You sill see it says maybe 10 lines from the top

print "Running in Poser 8"

Print is the command to ahh print data on you screen. Change that line between the quotes to read "Priniting Money" (snicker) or anything you like.

Oh, thanks, that makes sense.

Now I need to understand why he is greeting the world at the beginning of the script, and if it is necessary to be so formal, or can I just say, "Wassup!"


PickledPapaya ( ) posted Tue, 23 October 2012 at 5:36 PM

Quote - Yes, the point was to make the distinction between running as a stand alone and running as a script within Poser.

Yea, I assume it was the app.Mainloop() that was crashing Poser, as I was doing all my learning from the wxPython forums/sites direct, and not specific to Poser.

Thanks to both of you for the replies, I am progressing, have a dialog, fields,, etc...and am working on tying it into my script.  :)


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.