Mon, Jan 27, 7:26 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 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: Itty-Bitty Script #2


bushi ( ) posted Sat, 03 February 2001 at 8:28 PM · edited Mon, 27 January 2025 at 7:17 AM

Attached Link: http://bushi3d.com/PythonScripts/ibscript2.py

Here's another small PoserPython script. This one is a bit more interesting. It changes a figure's head MT parameter dial values to random values from 0 to 1. There's also a tweek constant that you can change to produce negative values. As before, I'd like to hear from anyone that tries it on a Mac. BTW don't use this on anything but 'junk' figures since ALL the head MT parameter values will be changed


JeffH ( ) posted Sun, 04 February 2001 at 5:15 AM

Heh, sort of a face randomizer? Have you tried to create any geometry (props) with Python yet? -Jeff


jbrugion ( ) posted Sun, 04 February 2001 at 9:56 AM

Need to remind newbies that the "Undo Change" doesn't work with stuff changed by Python scripts. Something that will need to be worked into production scripts.


poserpro ( ) posted Sun, 04 February 2001 at 9:59 AM

cool random mt for posette's head. thanks


poserpro ( ) posted Sun, 04 February 2001 at 10:05 AM

this can be used to generate various of FACE(fc2) for the head. COOL.


poserpro ( ) posted Sun, 04 February 2001 at 10:07 AM

i just changed the actor name to chest, hehe see what it does to her breats :P


bushi ( ) posted Sun, 04 February 2001 at 2:56 PM

As to reseting the MTs back to 0, just remove the random function in the next to last line. change: SingleActor.SetParameter(SingleParameter.Name(),(random.random()+TweekValue)) to: SingleActor.SetParameter(SingleParameter.Name(), 0.0) That will reset all the changed MT parameter dials.


poserpro ( ) posted Sun, 04 February 2001 at 3:15 PM

cool:) How to "set" and "set" multiple MTs at a time ? and How to "reset" multiple MTs at a time ? for ex, I set chest , head, abdomen at a *py click and rest them back to 0.0 TIA


poserpro ( ) posted Sun, 04 February 2001 at 3:17 PM

oops:P cool:) How to "set" multiple MTs at a time ? and How to "reset" multiple MTs at a time ? TIA


bushi ( ) posted Sun, 04 February 2001 at 3:58 PM

As far as this script is concerned, you could select multiple actors by changing the if statement. change: if SingleActor.Name() == 'Head': to: if (SingleActor.Name() == 'Head') or (SingleActor.Name() == 'Chest'): Now all the MTs for the Head and the Chest will be selected. You could make this script much more generalized by using some of TkInter's widgets. There's one called 'CheckButton' that gives a panel with selectable boxes. I haven't tried building one of these with actor names at runtime but I'd think it could be done. Jeff - No, I haven't tried that yet. I've looked at the examples and it looks like it's fairly straight forward. I need to get a bit deeper into the examples before trying it though.


poserpro ( ) posted Sun, 04 February 2001 at 4:15 PM

thanks, I did a "set" and "reset" multiple MT.py. But what if I like to set all , and reset all ? TIA.


bushi ( ) posted Sun, 04 February 2001 at 4:38 PM

That's easy. If you comment out the if statement (put a '#' in the first column of the line) then ALL actors will either get or reset.


poserpro ( ) posted Sun, 04 February 2001 at 5:01 PM

wow, thanks. It works :)


poserpro ( ) posted Sun, 04 February 2001 at 5:04 PM

hope there will a python to get rid of the unnecessary bones in SETUP with a l single click:P


poserpro ( ) posted Sun, 04 February 2001 at 5:23 PM

let me explain this, for example, if we need to delete all the finger bones in both hands, using delete will be tedious, so I figure if there is a custom py to delete all the fingersd leaving only hand parts. TIA.


poserpro ( ) posted Sun, 04 February 2001 at 5:26 PM

it seems one can't undo the py after hitting a py buttons in python scripts panel.


JeffH ( ) posted Sun, 04 February 2001 at 5:39 PM

That's true, there is no undo for a script.


bushi ( ) posted Sun, 04 February 2001 at 5:47 PM

I haven't looked through the PoserPython docs to see if there are any functions related to the setup room so I'm not sure on that point. As to undoing scripts, I'm certain that as the scripts get more complex there will be undo functions built into them. Actually that would be relatively simple. It's just a case of saving the current state of the actors before changing them. An undo would just reload the saved values.


poserpro ( ) posted Mon, 05 February 2001 at 4:18 AM

The Random MT py ( for head alone) turns out a good tool to create many convincing facial expression or new looks. It is a very import ant tool now. the reason is simple, normally we have to manually adhust the parameter dials to achieve new looks or expresson, with trial and error, it takes time. But with the random MT py, it is very quick and easy way to get many random sample and part of them are very useful to save as spawn morph or fc2. I found the tweekValue is a key to the ramdom effects. so changing it may result in different combination of MT. Thanks to Bushi who enlighted me for the py.


poserpro ( ) posted Mon, 05 February 2001 at 4:25 AM

the reason for asking an undo is becasue when i hit the random mt py, i kept hitting unaware of a mt is very good to save as spawn or f22, but i was too quick to hit next so i failed to keep it and ctrl + z has no effect on this:( btw, anyway to make an incremental MTs, i mean with one py hit, the dials will increase the amount for say 0.001( or any ) so that i can see the increasingly morphing effect. TIA


bushi ( ) posted Mon, 05 February 2001 at 11:18 PM

Yes, I could add an undo (at least 5 or 10 layers deep) and an incremental parameter change. Actually it would be good practice since it will require some TkInter programming to do it. I've also been thinking about adding a symmetry feature. That would be where selected parameter dials would get the same random adjustment. As an example, having the 'blink' parameter be set the same for the right and left eye.


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.