Forum: Poser Python Scripting


Subject: Moving morphs between different figures

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


Spanki posted Sun, 16 March 2008 at 5:13 AM

Quote - Sorry, but whot you did has not mutch to do with using Numeric. What you do is taking a Numeric-array and transfer element by element back to python to compute results with pure Python...

 
You're correct, but the functions you listed wouldn't really be any use to us, as far as I can tell (although there may be others that would help).  My test example is a little misleading, because I am using several 'dummy' values that aren't changing.  In the real code, those are different and/or computed for each loop.  It also doesn't have the 'if xx' tests of the real code in it (where it would break out of the loop early), so we want to be testing (and doing math on) them one at a time.

Anyway, here is a link to my current test-script and the Vector module (readme file included).  I'm always interested to learn new things, so if you can find a way to make the Numeric test faster (within the requirements above), I'm all ears :).  But that may just be an acedemic excersize...

With a few more additions/changes to the second test (python routine using vector storage method and features), that code is now almost 5x faster than the non-vector test.  But, the third test (test routine done by the module) is where the money is... it's about 10x faster than the slowest (current TDMT-style) code.  Once we have a few more classes and functionality ported over into the .pyd file, we won't have any more need for Numeric.

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.