Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
You want to cycle through an animation , and set one morph dial to the same value as another morph dial ? YES its certainly possible.
its parameter.Value to get the current value and parameter.SetValue() to set it where parameter is the parameter that you get from the actor which comes from the figure.
like this
p1 = scn.CurrentFigure().Actor("Hip").Parameter("Xtran").Value()
p2 = scn.CurrentFigure().Actor("Body").Parameter("Xtran").SetValue(p1)
Ok. Got that almost done. Redoing the code break it up a bit.;)
Got one additional question in relation to this python script.
Since I may have to write different .py files for figure, clothing, etc..how would I got about making a menu inside Poser 7 with those choices?
And also, is there a way to have an If statement to see if a Pose file exist? For instance, I have Elite, Creature Morph..but if someone didn't, I can see a whole bunch of debugging menu. But is there a way to
If Pose File Exists
load library pose
?
tkinter lets youu make a graphic interface , Poser 7 has some dialogs that can be used for specific things , like select from a list, yes/no buttons or input fields for numbers or text. The dialogs are a lot easier than tkinter.
for the file thing you build up a file path as a python string and use os.path.exists(path) to test. It returns a true/false value.
you need to add import os.path to your script.
mypath = runtime path + "/myfile.pz2"
if os.path.exists(mypath):
loadlibrarypath(mypath)
You can use poser.Libraries to get the runtimes or poser.AppLocation() to get the poser program folder.
Get the python documentation from www.python.org for python 2.4
** Now for a commercial **
Philc has a document on Poser Python thats pretty good , it includes code examples.
Very nice examples for tkinter
Its a bit pricey for me but its worth a look.
** fade to black ****
Thank you. I will take a look at PhilC book (once I got my bills paid >.> ) :) I have more scripts to write for a tool set for my next movie.:) Going to modify my script to reflect the ospath and stuff.
Also, I looked at a preview of PhilC book (he is so cool), it looks like it is laid out better then Poser Python Manual.:)
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.
Content Advisory! This message contains profanity
Working on a script to "bake" Victoria 4 animation so Interposer can bring it into Cinema 4D (Cinema4D doesn't do Victoria 4 magnets deformers).
Is there a way for me to SetParameter with a value based on a variable?
For example, say if I spawned a morph target based on BreastNatural. Is it possible to set the parameter on the original morph target to the spawned? The reason I want to do this (if possible) is copy the Magnet base morph values and import it into the spawn morph target throughout the animation.