tws0002 / blur-dev

Automatically exported from code.google.com/p/blur-dev
0 stars 0 forks source link

How to convert data to native python values fast? #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
All the maxscript values seem to be value_mapper. What is the fastest way to 
convert them to native python objects? I'd like to get a multi-dimensional list 
of vertices for an object. Or a one-dimensional as strings from the 3. But 
iterating over them to assemble a list seems rather slow.

Original issue reported on code.google.com by instinctvfx@gmail.com on 5 Jun 2012 at 10:31

GoogleCodeExporter commented 9 years ago
Unfortunately I don't think there is a way to do that. You could write a 
maxscript to do that similar to the py_helper maxscript. But in some cases, 
I've found a python for loop pulling data from Py3dsMax is faster than the 
maxscript equivalent.

The Py3dsMax plugin automatically converts most basic types to python 
equivalents. Anything it doesn't recognize it returns as a value_mapper object. 
You should be able to interact with them (mostly)the same way you would 
interact with them in maxscript. 

Original comment by hen...@gmail.com on 4 Dec 2013 at 7:50