Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Ha, I think I've just answered my own question :-) There is a parameter method TypeCode() which seems to consistently return a value of 49 for deformerPropChan Parameters. This value appears uniquely different from any of the typecodes returned for the standard Transform parameters (scale, xROT, yTRAN, etc). There's no obvious kParmCode for this and I haven't seen any way to do a reverse lookup starting with the value, so I'll just plug the number in. This might be a useful augmentation of Ockham's original zeroMorphs.py script.
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
Interesting find. For distinguishing mag and wave parms, I'd used string.count to locate the 'Mag' or 'Base', which was definitely clumsy. Wonder if TypeCode holds any more goodies?
My python page
My ShareCG freebies
From memory, the standard Transform TypeCodes seemed to go up to about 36 or so. It seemed a good indication to me that a consistent 49 on all the deformerPropChan parameters was not just - Unknown or Unassigned. I also noted that the x,y,z values of parameters that comprise a tuple all returned the same code. I once trawled through the resource fork of Poser 4 when I was running Mac OS 9 looking for strings to flesh out my knowledge of the CR2, etc. file formats. I found some interesting things like deltaMulDelta and deltaDivDelta in addition to the standard deltaAddDelta used in JCM/ERC. It might be worth having a look for other kParmCode strings.
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
Here is the list I've extracted from the P5 Mac OS X binary. kParmCodeXROT kParmCodeYROT kParmCodeZROT kParmCodeXTRAN kParmCodeYTRAN kParmCodeZTRAN kParmCodeXSCALE kParmCodeYSCALE kParmCodeZSCALE kParmCodeASCALE kParmCodeFOCAL kParmCodeHITHER kParmCodeYON kParmCodeTAPERX kParmCodeTAPERY kParmCodeTAPERZ kParmCodeKDRED kParmCodeKDGREEN kParmCodeKDBLUE kParmCodeKDINTENSITY kParmCodeDEPTHMAPSIZE kParmCodeDEPTHMAPSTRENGTH kParmCodeTARGET kParmCodeGEOMCHAN kParmCodeCENTER kParmCodeCURVE kParmCodeGRASP kParmCodeTGRASP kParmCodeSPREAD kParmCodeWAVEAMPLITUDE kParmCodeWAVEFREQUENCY kParmCodeWAVELENGTH kParmCodeWAVESTRETCH kParmCodeWAVESINUSOIDAL kParmCodeWAVESQUARE kParmCodeWAVETRIANGULAR kParmCodeWAVETURBULENCE kParmCodeLITEFALLOFFSTART kParmCodeLITEFALLOFFEND kParmCodeLITEATTENSTART kParmCodeWAVEPHASE kParmCodeWAVEAMPLITUDENOISE kParmCodeWAVEOFFSET kParmCodeVALUE kParmCodePOINTAT kParmCodeLITEATTENEND kParmCodeHAIRDYNAMICS kParmCodeDYNAMICPARENT kParmCodeCLOTHDYNAMICS I'm just coding a script to see if I can verify whether there are any allocation holes in the list or whether this is the full enumerated type.
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
My python page
My ShareCG freebies
That's great Ockham, P5's decided to play silly buggers again on me, but I think the additional info from the strings extracted from the binary implies that: kParmCodeGEOMCHAN = 43 kParmCodeCENTER = 44 kParmCodeCURVE =45 kParmCodeHAIRDYNAMICS = 68 kParmCodeDYNAMICPARENT = 69 kParmCodeCLOTHDYNAMICS = 70 I thought it should be possible to just print these constants if the poser library has been imported. Unfortunately not. It may be that the string is used as a dictionary lookup for a method, but without access to the python interface declarations, it's impossible to tell. It's also possible that the last three fill the missing gap at 37, 38, 39.
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
I see what you mean. The same print statement that works fine for the "older" codes gives a not-defined error for these. So these probably couldn't be used in a real program either.
My python page
My ShareCG freebies
Ockham, I just stumbled on what I had been doing wrong in trying to print the kParmCode constants. I needed to prefix them with "poser." as in: import poser print "kParmCodeGEOMCHAN = ", str(poser.kParmCodeGEOMCHAN) the output listed above should read (as printed by Python): kParmCodeGEOMCHAN = 43 kParmCodeCENTER = 44 kParmCodeCURVE = 45 kParmCodeHAIRDYNAMICS = 90 kParmCodeDYNAMICPARENT = 92 kParmCodeCLOTHDYNAMICS = 91 Cheers!
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
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.
I'm trying to find a way to reset the morphs, value parameters and deformer channel parameters in a figure's body parts before I choose which deformers I will create a morph from. I'm running P5 on a Mac, btw. I have looked at Ockham's zeroMorphs.py script (and added non-Tkinter except clauses with the appropriate nested actor and parameter for loops), but it completely ignores all the deformerPropChan parameters. There doesn't seem to be an equivalent for the deformer channels to the actor methods IsMorphTarget() and IsValueParameter(). I've looked at the InternalName() of these parameters and the only thing that springs to mind to distinguish them from the Transform parameters, which I don't want to touch, is that they all have either a colon (magnet parented to another figure) or the word "Mag" in them. Anyone have any suggestions before I kludge this?
My ShareCG Stuff
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.