R_Hatch opened this issue on Sep 21, 2009 · 8 posts
R_Hatch posted Mon, 21 September 2009 at 5:17 AM
Anyway, this script was my best friend in Poser 6, but Poser 8 has a totally asinine new way of naming every damn thing, so it no longer works. I would very much appreciate it if someone would convert it to Poser 8 Python. For reference, it's supposed to work like so:
Only for the current figure
Only for all body parts and props (magnets are not affected)
set all translations, rotations, morphs, and master parameters to zero
set all scales to 100%
(I don't actually care about it working for props)
PhilC posted Mon, 21 September 2009 at 7:15 AM
A large number of my scripts include tools to zero the figure or various aspects of it. One such is Wardrobe Wizard which is now included in Poser 8.
In Poser 8 open the Python script window.
Click the "Wardrobe Wizard" button.
Click the "Zero Figure" button.
OBJ2CR2 and Shoe Converter have more options including one to exclude magnets.
Rather than use the Name() method to define the parameter it may be better to use the poser.kParmCode because this takes language versions out of the equation.
Your script is set up to bypass any dial that is hidden. A number of figures, particularly V4 and M4 have a very large number of their dials hidden, presumably to prevent users from hurting themselves. Had you realized this?
ockham posted Mon, 21 September 2009 at 7:30 AM
Given your specs, this should do.
Tested in P8, and it does work.
==================
import poser
scene = poser.Scene()
for actor in scene.CurrentFigure().Actors():
if actor.IsProp() or actor.IsBodyPart():
for param in actor.Parameters():
if not param.Hidden():
param.SetValue(0.0)
actor.ParameterByCode(poser.kParmCodeASCALE).SetValue(1.0)
actor.ParameterByCode(poser.kParmCodeXSCALE).SetValue(1.0)
actor.ParameterByCode(poser.kParmCodeYSCALE).SetValue(1.0)
actor.ParameterByCode(poser.kParmCodeZSCALE).SetValue(1.0)
scene.DrawAll()
Penguinisto posted Mon, 21 September 2009 at 8:33 AM
Heh - D|S has that option baked-in for any figure in a scene. :)
(BTW - language advisory? If it was in .NET maybe, but python is actually a good language...)
markschum posted Mon, 21 September 2009 at 10:40 AM
er, whats wrong with 'window>joint editor>zero figure' ?
PhilC posted Mon, 21 September 2009 at 10:49 AM
It doesn't zero the translations or the morphs, plus IK's need to be turned off for it to work correctly.
MikeJ posted Mon, 21 September 2009 at 8:43 PM
Quote -
(BTW - language advisory? If it was in .NET maybe, but python is actually a good language...)
That's got to be about the funniest thing I've read all day. :laugh:
R_Hatch posted Tue, 22 September 2009 at 12:05 AM
Thanks Ockham and PhilC :) And thanks everyone else for the fun replies, too :D
Could you tell I was a bit frustrated? And btw, at least if it was .NET I probably
could have fixed it myself ;P