Forum: Poser Python Scripting


Subject: My Pie Script Wish List (mispelled on purpose,,heh

radstorm opened this issue on Aug 14, 2007 · 9 posts


Cage posted Wed, 15 August 2007 at 12:31 AM

4: One true click method to turn of IK, and zero pose the figure.

This one wouldn't be too hard.  The problem, apparently, with the IK would be determining in one click which IK chains to deactivate.  If you want all of them in one go, it's a simple script.  If you want to pick and choose, you probably need a GUI, so you end up with almost as many clicks as using the pull-down menu.

For zero pose, the following might work, in one click.  (Written off the top of my head, here, so this is untested....)

#############
import poser

scene = poser.Scene()
fig = scene.CurrentFigure()

for act in fig.Actors():
    if act.IsBodyPart():
        parm = ParameterByCode(kParmCodeXROT)
        parm.SetValue(0.0)
        parm = ParameterByCode(kParmCodeYROT)
        parm.SetValue(0.0)
        parm = ParameterByCode(kParmCodeZROT)
        parm.SetValue(0.0)
##############################

Number two may already be covered to some extent, possibly by one or more of Ockham's free scripts.  Numbers one and five would be difficult, if they're even possible with PoserPython.  There doesn't seem to be any "hook" to allow Python to figure out how the mouse is relating to the 3d view.  I can't even guess about number three....

===========================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.