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.
View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message