Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
Glad to see you made it over here.
I'll make a stab at this as I don't know whether ockham has P6 yet.
The most important thing I need to know is whether your using a PC or a Mac.
If your on a PC, I should be able to do a GUI of some sort for this, otherwise it will have to be a set of scripts that just apply a particular group of settings to the current simulation (at least to start off with as there may be a way around the Mac GUI problems).
I'll post the script here when I have one.
Attached Link: http://www.poserfashion.net/cloth_parameters.htm
oh, I am sorry...I am using Windows.;) (as opposed to linux..when p6 ports over or a wine is made, then maybe..) I am attaching a link to the clothing parameters..the ones I commonly use is the libraries, cause the default matches the poser cloth room more. What I want to be able to do is select a simulation, and click on a radio/button/something and the settings will go to what cotton is, or whatever cloth settings. I think it would be useful for people who use the cloth room, but have no idea what the base foundation should be for cloth type..sure the manual said the last I looked (haven't read p6 manual yet) that silk has a less bend resistence then wool..well, yea I can see that, but what general range should it be? If I am asking that, a lot of others would. The numbers aren't exact (careful wit hthe density), but it provides a basis for tweaking.;)I'll make sure to make it easy for you (or anyone else) to adjust the presets (or add new ones).
I'm going to try for a dialog that has a list of cloth simulations (you pick which ones to apply values to), entry boxes for the numbers, a set of preset buttons, and an apply button.
My biggest gripe about the Cloth Room would be that the parameters don't seem to have (any) units that can be related to the RealWorld, which means that I only have the visual result to go on when trying to simulate a particular type of cloth.
Actually, that pretty much everyone who uses cloth room, and admittedly mine as well gripe. The problem is, without kicking CL too much in the balls, is that they implemented cloth room settings into poser without wondering if it was the most inituiative way to do it..I still won't use the dyn.hair cause I don't like the looks of them. The strands are nice and all, but transmap looks better for one reason or another. Getting them to collide? ARGH.;) And cool..I understand based on your explaination of where the setting should go, and such points as that..just getting them to work in a practical poser clothed environment was causing me to talk to myself;)
When you run the script the list box will show all current Cloth Simulations, adn you can select any combination of them.
Clicking the "From Sim" button will get the settings from the last simulation you selected.
Clicking Default will restore the values to the Cloth Room defaults.
If you look in the script you will see how to setup values for the Presets, and how to add others (the script will make buttons automatically for any Preset defined).
All values below Air Damping and not available from the Cloth Room screen and there effect can only be inferred from the names.
Click the Apply button to alter the settings for all selected simulations.
Click the Quit button to quit :)
The script will not notice changes in the number of simulations, so if you add or remove simulations you should rerun the script.
I may add the ability to load and save presets later.
All the button and label text is defined at the beginning of the script if you wish to change them from English to some other language.
Right click on the link and Save As ...
Change the name to (say) ClothSimSetter.py and select directory of your choice.
You can run it from the File menu or assign to a Script button.
Message edited on: 03/28/2005 00:06
Tried and failed on a Mac (OSX 10.3)...
Traceback (most recent call last):
File "", line 295, in ?
File "Macintosh HD:Applications:Poser 6:Runtime:Python:Lib:lib-tk:Tkinter.py", line 35, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
Of course it may be, that I'am missing something about running python scripts on a Mac ;-) I did it the way I'd do it on a PC.
Message edited on: 03/29/2005 14:49
Yesterday's the past, tomorrow's the future, but today is a gift. That's why it's called the present.
I pulled this off a thread in the Mac forum, discussing P6. It's from a readme file: "TKinter, a UI toolkit commonly used by Python developers is not available on Mac OS X for the version of Python Poser uses. Instead, Curious Labs has partially exposed the Poser UI to Python. Please see the PoserPython Methods Manual, the Wacro folder and scripts such as ExportFlashFiles.py or uncompressPoserFiles.py for reference)." Anyway, look forward to playing with this dynamic cloth script, once my P6 arrives....
Attached Link: http://www.philc.net/freestuff.htm
This one got me thinking, so I came up with the above. Not to say that one is better than another, I primarily enjoyed the exercise. Also Kamilche has done something similar in her Cloth Room Helper. Both scripts are on the freestuff page.As they say there are more ways to skin a cat. :)
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.
Ok, just wondering if this is possible: A gui toolkit to put dynamic control settings into cloth room so say you want to have sheets act like cotton, instead of typing out numbers from www.poserfashion.net, you just click a button, and it is done. Now, I was advise on how it can be done, and it is cool..but what I also want to be able to do is select which cloth prop to do it..for instance, if I have 4 simulations open, and I want to make the third one cloth..I want to be able to select it somehow, whether by typing in the name or something. I hope I explained it properly.:) ANYWAYS, I tried all my might, but I am afraid I don't understand python well enough to do much without blowing up my computer;)