Mon, Feb 10, 4:19 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: 2025 Feb 05 6:41 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: a script for parenting all loaded figures to figure 1?


beos53 ( ) posted Sat, 06 October 2007 at 1:40 PM · edited Sun, 28 July 2024 at 7:50 AM

Thanks to sandmarine for asking and nruddock for supplying a way to conform all loaded figures to a figure at one time.

My question is can the same thing be done only "parenting" all loaded figures to a main figures body?

The reason I ask is I know if you rescale a figure, the clothes are rescaled along with the figure if they are parented and conformed to the main figure. Such as my Aiko Short.

Thank you for any help

PoserPro 2014, Windows 7, AMD FX-6300 6 core, 8 GB ram, Nvidia GeForce GTX 750 Ti


nruddock ( ) posted Sat, 06 October 2007 at 2:12 PM

I think this should do what you want :-
Parent all other figures to the Body actor of the currently selected figure.

import poser<br></br><br></br>scene = poser.Scene()<br></br>fig = scene.CurrentFigure()<br></br>if (fig != None):<br></br>    act = fig.Actor("Body")<br></br>    if (act != None):<br></br>        for cfig in scene.Figures():<br></br>            if (cfig.InternalName() != fig.InternalName()):<br></br>                cfig.SetParentActor(act)<br></br>    else:<br></br>        print "Current figure has no Body Actor"<br></br>else:<br></br>    print "No Figure selected"

Combining parenting and conforming in one script is left as an exercise to the reader 😉


beos53 ( ) posted Sat, 06 October 2007 at 2:18 PM

wow...that was fast
Thank you!!!!!!!!!!!

PoserPro 2014, Windows 7, AMD FX-6300 6 core, 8 GB ram, Nvidia GeForce GTX 750 Ti


beos53 ( ) posted Sun, 07 October 2007 at 2:08 AM

I can't seem to get this to work
I have my main figure (body) selected, a couple of pieces of clothing (figures) on on the board
When I run the script...the clothing seems to parent with the main figure body, because when I try to select the piece of clothing and and go to Change parent, it is grayed out.
I conform the clothing and, it says the clothing is conformed to the main figure, but the clothing won't bend or resize...

PoserPro 2014, Windows 7, AMD FX-6300 6 core, 8 GB ram, Nvidia GeForce GTX 750 Ti


nruddock ( ) posted Sun, 07 October 2007 at 6:21 AM

Not sure what's going on, but I'll play around and get back when (or if) I figure out what's going on.


beos53 ( ) posted Sun, 07 October 2007 at 11:16 AM

Thank you

PoserPro 2014, Windows 7, AMD FX-6300 6 core, 8 GB ram, Nvidia GeForce GTX 750 Ti


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.