Wed, Jan 8, 5:34 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: Logic for an illogicail scripter display order of figures in a scene


grichter ( ) posted Tue, 19 June 2012 at 7:08 PM · edited Sat, 26 October 2024 at 11:07 AM

Dah, I guess I need to pay attention that PhilC updated his poser python tut to included wxPython...now I am really going to screw things up :)

 

Question:

If you load say V4 and then M4 and then put some clothes on V4 in that order of operation, in the in the figures list drop down in PP2012 and all other versions of Poser I have going back to P6 (all Mac) the list is shown as...(in the order they were added to the scene)

V4

M4

Clothes conformed to V4

via Python using for fig in scene.Figures(): you end up with the list in the same order.

Is it possible to use Python and reorder-sort the list to show the 1st figure in the scene and the conformers attached to it so the list could end up looking like this:

ie the items confromed to a figure are listed with that figure not in the order in which you loaded them into the scene.

V4

V4 Dress

V4 Shoes

M4

M4 Pants

M4 Shirt

 

write to a file and sort the file is the first thing that comes to mind, but that is getting ahead of my current python skill set,,,but if possible I can figure it out I think. But not sure if it is possible or if there might be a simpiler method a more experienced scripter has up their sleeve.

Just looking for ideas or hints for what directions to consider

TIA for any replies.

Gary

Gary

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


semidieu ( ) posted Wed, 20 June 2012 at 8:14 AM

for f in poser.Scene().Figures():
   if f.ConformTarget()==None:
      print f.Name()
      for conform in poser.Scene().Figures():
         if conform.ConformTarget()!=None:
            if conform.ConformTarget().InternalName()==f.InternalName():
               print conform.Name()
   print


PhilC ( ) posted Wed, 20 June 2012 at 1:22 PM

I do not think there is Python access to the Poser generated lists. They will be what they will be. You can however as semidieu demonstrates that you can manipulate that list for inclusion in your own lists.


grichter ( ) posted Wed, 20 June 2012 at 5:20 PM

thanks guys

Been looking at the code in the script what actor is this and how it determines what is conforming and what is parented.

Thinking of setting up a couple of loops, Grab the first base figure and then get everything conformed to it and then parented to it and skip everything else, then get the second base figure, etc.

Then finally list the loose figures with nothing conformed to them or not confromed to anything and props not parented to anything

 

we shall see if I am pull it off and not crash my computer :)

Gary

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


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.