Thu, Nov 14, 11:55 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 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: "Twisting"


Dana_CH_AZ ( ) posted Sun, 27 June 2010 at 3:57 PM · edited Thu, 14 November 2024 at 11:28 PM

 I am trying to create a script that randomly put values in bend,twist,side-side. It works except for one slight problem, Twist doesn't seem to want to work. I am currently writing it as:

scene = poser.Scene()
figure = scene.CurrentFigure()

p1 = figure.Actor("Chest").Parameter("Twist").SetValue(2) 

I tried this in the PoserPython Shell. If I did bend or side-side, it works. For twisting, it doesn't. Am I writing this wrong?


adp001 ( ) posted Sun, 27 June 2010 at 4:34 PM

In the shell try 

[ p.Name() for p in figure.Actor("Chest").Parameters() ]

and check the list to be sure you have the right parameter-name.




markok13 ( ) posted Sun, 27 June 2010 at 4:59 PM

I've had the same problem with some figures, especially the Millenium ones like Victoria 3 and Michael 3. I never found an explanation or a real solution, but I have an annoying workaround:

I rename all the 'Twist' parameters to something else, and make my scripts use that new parameter name (I use 'Twost'). What's annoying about this is that I can't do the renaming from a Python script. I have to go in and manually rename every Twist parameter. I now keep pre-Twosted figures in my library.


Dizzi ( ) posted Sun, 27 June 2010 at 5:07 PM

IIRC eg. V4 has two twist channels in the chest actor, that's why it does not work.

One solution is to do it like this:

for p in figure.Actor("Chest"):
 if p.Name=="twist": p.SetValue(2)



adp001 ( ) posted Sun, 27 June 2010 at 5:25 PM

Use the parameters InternalName. InternalName() is unique  for each parameter.




Dana_CH_AZ ( ) posted Sun, 27 June 2010 at 5:27 PM

 I must be typing it wrong, because when I do...I get a "nonsequence" error.


Dizzi ( ) posted Sun, 27 June 2010 at 5:39 PM · edited Sun, 27 June 2010 at 5:40 PM

Sorry, it should work like that:

for p in figure.Actor("Chest").Parameters():
 if p.InternalName()=="yrot": p.SetValue(2)



markschum ( ) posted Sun, 27 June 2010 at 5:44 PM

You are talking about setting the X,Y,Z rotate values for a body part. ?

I use this format after getting the actor object.

parm = actor.ParameterByCode(poser.kParmCodeXROT)


Dana_CH_AZ ( ) posted Sun, 27 June 2010 at 6:53 PM

 Ok, I need a slap in the head. For a brief moment of insanity..I forgot you have to put an enter after if blah=blah : :) I got it working now. Thanks.:)


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.