Forum: Poser Python Scripting


Subject: Moving morphs between different figures

Cage opened this issue on Dec 20, 2006 · 1232 posts


Cage posted Thu, 11 January 2007 at 7:45 PM

Which script are you examining?  The one I posted most recently was the WIP test for polygon intersection, with the memory leak.  That one?

The region code would have been the same in either case.

Edit: Okay... if you're getting the printout at the end, it's the WIP poly script you're testing.  If you change the argument for the variable "testing" to 1 when you run the main function, at the bottom of the script, it will create a box at every point of successful intersection.  Useful for visualizing when you're a bit slow, like me....  :)

For the polygon regions, I've tried to implement svdl's suggestion that vertices be used as the point of reference for placing polys in a region.  The result, if I recall correctly, is that polygons can end up listed in multiple regions, along the borders.  The polygon region list is built from the vertex region dict.  (The dict was to become a list, but the memory leak problem broke before I got to that.  I tested a list instead of a dict in one version, but that  version was a mess with various tests for the leak built in, and the dict ended up in the posted code.)

I'm glad you've caught this, with the regions.  There were no errors in the vertex comparison script as a result of what you report, so I never even checked for such a thing....

I don't think vertices alone will work to create weights.  If it can work, I have no idea how.  There doesn't seem to be enough information available without using the polygons as a point of reference.  Someone please - prove me wrong.  :)

Thanks for checking this, Spanki....

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