Forum: Poser Python Scripting


Subject: Moving morphs between different figures

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


Cage posted Fri, 12 January 2007 at 12:06 AM

Thanks, adp001.  I spent the better part of a week experimenting with the gc module and the copy module, to see if I could improve the situation at all.  Sadly, the improvements were minimal.  Have you ever studied the code for Walk This Way?  In that script, svdl seems to use garbage collection (without success) to fight a PoserPython memory leak.  He seems to have determined that the problem is Poser itself, and has included a warning in the readme for the script to that effect.  Hopefully I'll hear from him soon and I'll be able to stop guessing about what he problems he encountered and any conclusions he may have reached about them.  It looks to me like I will have to use Python 2.5 to create a standalone script, if Poser's memory handling truly is the source of the problem.  Can you clarify what is meant by a "frame object"?  Part of my trouble may be that I'm really not sure what the Python docs are talking about when explaining some things. 

Spanki, I plugged in your code and immediately got errors due to ungrouped vertices.  :-P  That may reflect differences in the testing geometries we're using.  I've added features to help me track what's happening with the grouping.  All of the vertices are being grouped and none are being multi-grouped.  All of the polygons are being grouped and those along the octree boundaries are being multi-grouped, except in certain cases.  The attached script will color the target geometry's polygons by region assignment.  Multi-grouped polys are given a separate color.  I've been testing with a Poser ball prop as meshA and a Poser ball prop which has been smoothed once in Wings 3D as meshB.  I've also plugged in the code you advised, but it's commented out right now while I try to figure out why it errors....  And, ah, there's a lot of junk in there, mostly commented out, which is left over from fighting the memory leak.  Sorry about the mess....

So perhaps if I add the polygon edge list into the sort when filling the polygon region list, we'll get better results.  I'll look at that.  Thank you.

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