Forum: Poser Python Scripting


Subject: Moving morphs between different figures

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


Spanki posted Thu, 03 April 2008 at 8:26 PM

Uhm, actually one of my points was... as long as you ever have it all in memory at any one time, you might as well have it all in emory, as long as it needs to be.  Anything you're going to be using within each loop you should just keep around for the duration.

re: mesh.VertPositionsChanged() ...

Here's the deal... previously, when you got the world verts, you were modifying those directly (even though your comments seemed to imply that you intended to be getting a 'copy' of them).  So anytime you modified them (ie. like in IntegrateSysOverTime()), you were modifying the ones that the Mesh class knew about.  Which, btw is the only reason that the correlations kept working.

Now that you're getting a real 'copy' (and not a pointer to the originals), every time you move th verts around (either setting the shape or updating the (active) morph values), you'll need to call mesh.VertPositionsChanged(), so the mesh can go grab the updated vertex locations and recompute the now altered/deformed poly face normals, etc.

Since you're generally just grabbing the vertex normals but then altering those anyway, there's no need to keep getting new ones (unless you want actual current vertex 'normals' instead of the ones you've been faking for 'projection direction' purposes).

Does that answer any (or all) of your questions?

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.