Wed, Nov 27, 1:31 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: My Pie Script Wish List (mispelled on purpose,,heh


radstorm ( ) posted Tue, 14 August 2007 at 10:45 AM · edited Tue, 26 November 2024 at 11:31 PM

my py script wish list:

1: My main one. A way to paint textures right on a mesh(object)inside Poser instead of having to export out the mesh, do that unwrap thing, paint it, then back in again. Nothing elaborate, just basic and quick. I mean just doing pose, one can export an image and post work it with Paint Shop Pro, or a-dopey.. but in animations..you need to texture the object 360..I hate the material room, that shine / reflect crap, etc..I actually liked the Poser 4 way better..pick a bump, slap it on, done.. lol. This would be a handy tool for like texturing a mountain scene, and adding a snow cap to your own specs, not prefab mapping.

2: A bvh randomizer.. a sort of basic loop within a loop, overlap loop. etc. Would make some animations a bit less mundane.

3: Make all those Poser menus stay on top the way the parameter dials do for the others such as..light, camera, tools etc..that way you could expand your documanet window edge to edge.

4: One true click method to turn of IK, and zero pose the figure.

5: A better way to adjust lights..maybe something like point and click in the window.

6: And of course make this stuff affordable for everyone.

I use Poser 5 by the way, and I don need no stinking vista

That's all for now :o)


Cage ( ) posted Wed, 15 August 2007 at 12:31 AM

4: One true click method to turn of IK, and zero pose the figure.

This one wouldn't be too hard.  The problem, apparently, with the IK would be determining in one click which IK chains to deactivate.  If you want all of them in one go, it's a simple script.  If you want to pick and choose, you probably need a GUI, so you end up with almost as many clicks as using the pull-down menu.

For zero pose, the following might work, in one click.  (Written off the top of my head, here, so this is untested....)

#############
import poser

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

for act in fig.Actors():
    if act.IsBodyPart():
        parm = ParameterByCode(kParmCodeXROT)
        parm.SetValue(0.0)
        parm = ParameterByCode(kParmCodeYROT)
        parm.SetValue(0.0)
        parm = ParameterByCode(kParmCodeZROT)
        parm.SetValue(0.0)
##############################

Number two may already be covered to some extent, possibly by one or more of Ockham's free scripts.  Numbers one and five would be difficult, if they're even possible with PoserPython.  There doesn't seem to be any "hook" to allow Python to figure out how the mouse is relating to the 3d view.  I can't even guess about number three....

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


radstorm ( ) posted Wed, 15 August 2007 at 3:57 AM

Thanks for the reply, Cage.. Yeah I was thinking it might be more than just a few lines of code for some of my wishes..lol

And yes I think you are right about the bvh,,I do recall seeing something similar to that around..

Just wish there was a way for my main one,,number one..life would be a lot easier doing the detailing right inside Poser, less costly too, I hope.. :o)

That's becoming the problem of trying to enjoy Poser these days, the price of all the other software you need is sort of taking the fun out of it all..especially when  lot of these utility cost 2 times if not more than the price of Poser itself...

But thanks for the script,,everything that saves me time is a blessing :o)


AndyCLon ( ) posted Sun, 19 August 2007 at 10:12 AM

Here's a script to to turn all of the IK off. You need to have a blank line on the end so that the for loop knows it's ended.

import poser

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

# Turn off IK
for name in fig.IkNames(): 
  fig.SetIkStatus(fig.IkNames().index(name),0)


Cage ( ) posted Sun, 19 August 2007 at 1:20 PM

*"You need to have a blank line on the end so that the for loop knows it's ended."

Really?  Is this always true?  True of PoserPython, or Python in general?  Wow, I had no idea.  😊 

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


nruddock ( ) posted Sun, 19 August 2007 at 3:29 PM

Quote - *"You need to have a blank line on the end so that the for loop knows it's ended."

Really?  Is this always true?  True of PoserPython, or Python in general?  Wow, I had no idea.  😊 

No, but you need to make sure that there is a newline after the last script line, to stop the Python parser throwing a spurious syntax error (might be fixed in 2.4).


AndyCLon ( ) posted Sun, 19 August 2007 at 4:15 PM

Ah that's what it is. It was producing some wierd errors, which were fixed when I added the additional blank line. I've seen similar problems with other script parsing software so that why I tried that.


Cage ( ) posted Sun, 19 August 2007 at 4:30 PM

*"No, but you need to make sure that there is a newline after the last script line, to stop the Python parser throwing a spurious syntax error (might be fixed in 2.4)."

*Good to know.  Thank you!  :)

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


radstorm ( ) posted Sun, 19 August 2007 at 10:29 PM

Hi all, thank you for the scripts.. Glad someone can write this stuff..because I sure can not.. lol


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.