|
Updated: July 4 2010 Using Python with Poser: Rescaling a Figure Python can automate some of the drudgery of creating poses and animations. When you rescale a figure by changing the body scale, the origin of the figure which is normally near the mid-riff for most figures, does not move. The result is that if you turn a female figure into a 100 foot tall giantess, she winds up half buried in the ground. You can fix this by using the command "Drop to floor" on the figure menu, but the origin of the figure is now at ankle height. No problem if you are okay with this, but this python script, RescaleFigure.py (click right to download), will do it for you and adjust the height of the figure so that the origin (center of rotation) is still in the middle of the figure. Before you run the script, edit the file and set the variable "new_scale" to the scale you desire. Pose the giantess to be as you want her, then run the script with the giantess selected. The script works by using the actor methods in poser python to set the scale, then runs the "drop to floor command" and looks at the height of the hip afterward. This value can be used to calculate an adjustment for the body height. The script then restores the original scale, performs "drop to floor" to get everything back to normal. It then resets the scale and adjust the parameter "yTran" in the figure body to move the feet back to ground level.
This is not a big deal, but I found this script to be very handy while I was developing my next python script project which is was a script to make a giantess walk without slipping and sliding her feet. Read all about that one in poser tip #5. By the way, you can use this same script for making shrunken characters as well. Just set the new_scale parameter to a fraction and the script will shrink the figure by the specified amount and place him on the floor.
|