Forum: Poser Python Scripting


Subject: Moving morphs between different figures

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


Cage posted Sat, 22 March 2008 at 11:48 PM

Okay, the local-world thing was simple.  I could have sworn I tried that combination at some point, but I guess I missed it.  Boy, the things I tried.  Heh.  Knowing how to do that correctly, however, I can now fix a few things in various scripts.  :D  Thank you.  And thank you for adding the local vertex list as well as the world vertex list!

The attached adds "mapping" types, offset from collision surface, and multiple actor handling.  The multi-actor is basically what we'll need in TDMT to get rid of any issues with neighbor edges.  With these new additions, I was able to do a more valid timing test.  This script handled the comparison which took seven minute before in 23 seconds.  Not bad.  :D  No need for octree that I can discern.

One question: I thought distance was always a positive value, but the distances returned by HitPoint can be negative.  Have I misunderstood something?

The multi-actor function will select actors which fall within the bounding box of the target actor.  Actually, this needs some tweaking.  I have been checking actor center distances from the bounding box to screen out actors before I do any intensive checks on any of them, but this can miss some valid actors.  So I need to re-work the process.

I haven't added .vwt handling yet.

Also, the lower cap on the capsule mapping type is broken.  My approach for capsule mapping is a bit of a kludge, really, and needs to be corrected.  I think I have the math reversed somewhere in the process, for that lower cap.

I'm still curious about the if delta versus if abs(delta).  Right now I have that part commented out, wehere I would have applied it, and I use the old FLT_EPSILON test.

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