Forum: Poser Python Scripting


Subject: Moving morphs between different figures

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


Cage posted Thu, 17 April 2008 at 11:41 PM

Another question to add the the queue (sorry... Cage is inquisitive).

*"Update 03/21/08:  Weights now being set...

The 'Weights' value(s) are now set/valid in the list returned by the CorrelateMeshVerts()
routine. Also note the 'HitDelta' value added below... this is the delta used by shape_transfer()
or shrink_wrap() type code and is also the value saved to the weight files."*

Based on the above, I assumed the hitlist weights were being set and I adapted the .vwt save routine for .pyd use.  I'm comparing using Mesh.CorrelateTo().  The saved .vwt file consistently writes one 1.0 weight and two 0.0 weights for each hit.  Here's a sample listing:

As written using the .pyd weights:

w 1535 2028 2153 2177 0.0 1.0 0.0 1.36664070909e-005 1.24608113424e-005 -2.71567055685e-005 8506

Same vertex, same mesh comparison, using TDMT classic:

w 1535 2140 2152 2153 0.0177274320282 0.120319208833 0.861953359139 -3.77376342688e-006 -2.86467008559e-006 8.37792508411e-006 8623

And it's like that throughout the file.  So I assume implementation of hitpoint Weights may just be incomplete for correlation methods other than C*orrelateMeshVerts()? 

*But there's more to it than that.  Hmm.  The correlation indices don't match either.  I guess I need to check my code to be sure I haven't done something wrong, as usual.  But I don't see what I could be doing to render those weight 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.