Sat, Jan 4, 5:24 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: Request/wish: the opposite of Auto-Group


R_Hatch ( ) posted Thu, 18 October 2007 at 1:49 AM · edited Fri, 18 October 2024 at 5:47 PM

A script to automatically name bones according to the group that occupies the same XYZ coordinates. It would work as follows:

(1) User takes grouped mesh into Setup Room.

(2) Using Bone tool, the user creates bones for each group, and drags them into place.

(3) User runs script, which first parses the skeleton, and stores each bone's center of mass XYZ coordinates.

(4) Script parses mesh for groups, and then gets center of mass XYZ for each group.

(5) Script compares these two lists.
(5a) Errors should be returned if:

  • There are more bones than groups. The user is prompted to create such geometry-free bones after the script is done. "hit OK to delete extra bones"
  • There are more groups than bones. Optionally, there could be a symmetry function, which could be toggled by having a radiobox for "Only process Left side", and "Only process Right side", with an edit box to enter a tolerance amount (for checking along the spine).
    If there are still too many groups, the script gives a final alert that the chosen side does not comply with the requirements, and then stops.

(5b) If no errors are found, the script attempts to match each bone and group according to their center of mass XYZ coordinates, and rename each bone thusly. Upon successful completion, the script should give a friendly "Done!" message.

I got the idea for this from Paloth and Conniekat8, so blame them if you end up staying up all night creating this script ;p


PhilC ( ) posted Thu, 18 October 2007 at 1:33 PM

If your starting point is a correctly grouped OBJ file and a known hierarchy you may find that creating the figure using the Poser menu "File/Convert Hierarchy File" to be quicker.

Have a look at Roy Riggs PHI Builder. That will take an OBJ file and spit out a hirierchy file. You will need to do some editing but this is basically just drag and drop withing the application to go from its best guess at the hierarchy to what you actually want.

I use it frequently. It is available from http://www.royriggs.com/poser.html


R_Hatch ( ) posted Fri, 19 October 2007 at 2:50 AM

I appreciate the advice, but I must inform you that I hate PHI files. I prefer to initially rig entirely within Poser, tweaking in CR2Builder if/when necessary.


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.