Forum: Poser Python Scripting


Subject: remove a slice from bottom of a prop..??

dennisharoldsen opened this issue on Apr 08, 2008 · 32 posts


Cage posted Wed, 09 April 2008 at 1:48 PM

This will flatten the bottom of a prop.  It will actually change the vertex positions in the prop geometry, and won't compensate for any world transforms in the prop, so the prop's transforms should all be zeroed when you run.

To define where the "bottom" should be, load one of the square props into the scene and rotate it so it's parallel with the GROUND plane.  Then move it on Y until it lies where you want the flattening to occur.  Rename this prop "SQUARE" (without the quotes), so the script will recognize it as your flattening square.  The script will error out if there is no actor named SQUARE in your scene.

Then select the actor to flatten, and run the script.

You could use the GROUND as the SQUARE actor, if you simply rename it before running.  You could really also use any appropriately named actor as SQUARE.  The script will look for the highest Y coordinate in the SQUARE geometry, to define the flattening plane (it assumes you have an axially-aligned actor with a plane flattened along the appropriate axis, but this is not at all necessary).  You could use a box or a sphere or a figure's foot as the SQUARE, if you name it appropriately.

Remember that this will actually alter the geometry of your selected actor!  Back up your scene if necessary before running.

A script to actually clip the geometry at the plane would be more complex.  This process can still give slightly jagged edges, along the edge of the flattened area.  Removing the verts might or might not give nicer results....

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