Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)
@Ajax & others interested in saving poses with dial values without ERC influence, you might be interested in this python code fragment below from my own script for saving BODY and actor pose information. This doesn't require zeroing ERC channels in the saved pose files. def DialAndDelta(Morph): #print Morph.Name(), val1 = Morph.Value() # read value #print val1, Morph.SetValue(val1) # set same value val2 = Morph.Value() # get new value #print val2, delta = val2 - val1 # find FBM or JCM delta influence #print delta, val0 = val1 - delta # find original parameter dial value for this actor #print val0 Morph.SetValue(val0) # reset to original value return (val0, delta) Cheers, GeoffIX
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
Hmm, just looking at my code again, it struck me that though DialAndDelta would successfully extract ERC influences applied via the valueOpDeltaAdd/deltaAddDelta # method, it might not work as expected for valueOpTimes, valueOpDivideBy and valueOpDivideInto operators since they are non-linear and DialAndDelta uses simple linear regression math... Given that over 90% of the ERC I've seen from others and written myself uses valueOpDeltaAdd exclusively, that's probably not an issue, but I thought it worth noting. Returning a raw channel setting (dial value) is still definitely a method eF needs to provide for Poser Python to account for the non-linear operators.
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
Wow! Thanks gwhicks! I'm kicking myself for not having thought of that. What a simple and elegant way of handling the problem. I agree, almost all the ERC out there uses the deltaAddDelta approach, so this would work for almost everything.
View Ajax's Gallery - View
Ajax's Freestuff - View
Ajax's Store -
Send Ajax a message
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.
![file_73392.txt](https://live.cdn.renderosity.com/forum/_legacy/file_73392.txt)
This is a script that saves poses. What's so special about that? Well this one will save poses for ERC enabled figures such as EasyPose figures. Because of some deficiencies in the way Curious Labs implemented the Poser Python methods, I had to use an ugly workaround, but in most cases you'll get usable poses with this. Read the doco at the top of the script for details. The script will also make placement poses, morph setting poses and scaling poses, so it can save you some time if you need to do those things. The Poses get saved to your top Pose directory. Later I may add some code to let you choose which directory you want to save in. Thanks to Ockham for all his help getting my head around Python and also to Lourdes whose morph pose script I used as an example to help me understand the approach to take. TO USE THE SCRIPT: Download the text file and rename it to PoseSave.py It needs to be added to an appropriate directory in RuntimePython and then you'll have to add it to your Python button window manually. Consult your Poser manual if you don't know how. I've only tested the script in Poser 5. I don't know if it works under Pro Pack.View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message