Thu, Nov 14, 8:14 AM 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: Primitive but useful ( at least for me ...)


mmogul ( ) posted Sat, 18 December 2004 at 1:34 PM · edited Tue, 12 November 2024 at 2:29 PM

i made almost 100 head morphs using MAX 4, then i made a lit Delphi app to generate random pose files using this morphs. Up to 10 morphs are used in each PZ2. Only 10% of the generated faces are usable, but all of them need a bit of refine.

This WAS my problem ... i had a long list of morphs in my parameters dials windows, and i wanted to see only the non-zeroed.

Here cames the extense ockhams script lib. I dowloaded a lot of them, studied 2 or 3 hours, and - voil- my first python script.

#Hidde all zeroed head morphs
import poser
import string

scene = poser.Scene()
fig = scene.CurrentFigure()
neck = fig.ActorByInternalName("neck")
head = fig.ActorByInternalName("head")

for Parm in head.Parameters():
        if Parm.IsMorphTarget():
                if Parm.Value() == 0.0:
                        # print Parm.Name()
                        # print Parm.Value()
                        Parm.SetHidden(1)
scene.SelectActor(neck)
scene.SelectActor(head)

Are you scary ? So, let me show the other :

#UnHidde all head morphs
import poser
import string

scene = poser.Scene()
fig = scene.CurrentFigure()
neck = fig.ActorByInternalName("neck")
head = fig.ActorByInternalName("head")

for Parm in head.Parameters():
  if Parm.IsMorphTarget():
    Parm.SetHidden(0)
scene.SelectActor(neck)
scene.SelectActor(head)

Works fine, very useful, at least for me. Please, send your applauds to ockham, that thaught Python to a jackass. Littles scripts, but a great content !

Thank you ockham


ockham ( ) posted Sat, 18 December 2004 at 4:33 PM

Yep, that's the best way to learn programming! Grab an example, change until it serves your needs.

My python page
My ShareCG freebies


tromnek ( ) posted Sun, 19 December 2004 at 1:45 PM

I applaud all this forums members for their generous response to our questions and sharing of their scripts. Many of us are new to the Python language and your help has made learning both the language and the poser specific stuff so much easier. thanks all, ken


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.