Thu, Jan 9, 4:11 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: my first simple python script


c1rcle ( ) posted Fri, 06 September 2002 at 3:39 AM · edited Thu, 09 January 2025 at 6:35 AM

yep I've been trying my hand at python at long last. I wrote a really simple script to load mike with a texture & hair then pose him. I know python is really good for manipulating the dials in poser, thanks bushi (faceshaper):) but can it be used to read a list of poser files or scan the directories? what I'm thinking is something like faceshaper but it has a lists of everything you have installed & allows you to pick say 1 character & texture, clothe & pose him with out having to do each step manually, just highlight the ones you want press a button & it runs a script in the background & it loads everything for you. Rob


ockham ( ) posted Fri, 06 September 2002 at 4:10 PM

can it be used to read a list of poser files or scan the directories? << Yes, certainly. But beware: there is something odd about the file-handling mechanism in Python. If you get everything just right, it works fine; but it often gives an "attribute error" for reasons that I've never figured out. Also, the file handling actions go by default into the same directory where Poser.exe lives, not in the Runtime.

My python page
My ShareCG freebies


ockham ( ) posted Fri, 06 September 2002 at 4:27 PM

Just to get you started, here's an extremely simple example of writing to a file. The Python documents are woefully short on such examples. # ------------------------------# import os Somefile = open('poo.txt','w') for i in range(10): ~PooString = "Index " + str(i) +"n" ~Somefile.write(PooString) Somefile.close() # -----------------------------# This will create a file named poo.txt in the same directory with Poser.exe, and write ten lines in the file: Index 0 Index 1 Index 2 Index 3 Index 4 Index 5 Index 6 Index 7 Index 8 Index 9 To read a file, you'd start with Somefile = open('poo.txt','r') and the loop might look something like: for i in range(10): ~Newstring[i] = Somefile.read()

My python page
My ShareCG freebies


c1rcle ( ) posted Sat, 07 September 2002 at 2:54 AM

wow thanks ockham, I've still got a lot of reading on python to do, & i'll have to upgrade it when P5 arrives too, I've got v1.5.2 installed right now to fit in with poser.


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.