Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
Well, that's partially true. Actually, I haven't gotten around to it. I have an offer to host my site, but I and the new host haven't gotten together yet to set the thing up. One of these days, hopefully.
Last time I tried to edit my sigline, Rosity got mad at me. :lol: I think it was during the long period when they were modifying the site, and my difficulties may have related to that. :unsure:
===========================sigline======================================================
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.
Cage had some freebies, compatible with Poser 11 and below. His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.
I think you must have missed the relevant page in the PoserPython manual (page 13½ for Poser 6)...
kParmCodeKABAM
kParmCodeKABLOOIE
kParmCodeKABOOM
kParmCodeKERPLUNK
kParmCodeKERPLONK
kParmCodeKERSPLAT
...etc...
:blink:
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
Quote - I think you must have missed the relevant page in the PoserPython manual (page 13½ for Poser 6)...
kParmCodeKABAM
kParmCodeKABLOOIE
kParmCodeKABOOM
kParmCodeKERPLUNK
kParmCodeKERPLONK
kParmCodeKERSPLAT
...etc...:blink:
Ah, you see. There's the problem. I never had Poser 6, which was released during a period when I couldn't afford to upgrade. I've had all the other versions since Poser 4, but I've never seen that relevant section in the Poser Python docs. The Poser Python docs tend to be... hmm. Not quite thorough and up-to-date, most of the time. Full of holes, like my old canvas Converse sneakers. :lol:
===========================sigline======================================================
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.
Cage had some freebies, compatible with Poser 11 and below. His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.
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 have a warning for my fellow Python scripters. Be careful, when zipping through an actor's parameter dials and setting them. If you have a script, for instance, to zero all rotations, translations, morphs, etc, and you just treat the default case as setting to zero... you can run into trouble.
Poser allows us to set certain internal dials that aren't supposed to be set. These dials have no listed parameter codes, in the manual, but we can set them, intentionally or accidentally.
[quote]
fig.Memorize()
scales = [poser.kParmCodeXSCALE ... poser.kParmCodeASCALE]
never_ever_set_these_internal_dials = [17,18,19,20,21,22,31,32,33,34,35,36] #Offset,TranB,_joint,_twist,_smoo parameters should not be set!
for figact in fig.Actors():
if not figact.IsBodyPart():
continue
for parm in figact.Parameters():
if parm.TypeCode() in never_ever_set_these_internal_dials:
continue #Setting these can screw up your figure if the script crashes.
if parm.IsMorphTarget() or parm.IsValueParameter():
continue
if parm.TypeCode() in scales:
parm.SetValue(1.0)
else:
parm.SetValue(0.0)
.....
fig.Reset()
[/quote]
I had a script crash during testing, and I was unable to recover the figure settings after the crash. The script had set the Offset, TranB, _joint, _twist, and _smoo internal cr2 dials to zero. These dials had not been memorized by the script call to Memorize(), and could not be reset. The figure went kablooie.
So be careful about how you set the paramter dials, is all. These dials don't have TypeCode listings, but they will reveal their TypeCode values, so they can be screened when running any parameter-setting script. The codes are:
never_ever_set_these_internal_dials = [17,18,19,20,21,22,31,32,33,34,35,36]
Because, you know. The figure can go kablooie. :scared:
===========================sigline======================================================
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.
Cage had some freebies, compatible with Poser 11 and below. His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.