Le dimanche 26 février 2017 15:39:39 UTC-8, Michael Boon a écrit :
>
> Slower than C++ for sure, but depending on your needs it might still be 
> fine. I often set normals on meshes up to about 100k verts using Python.
>
> To create your MVector array (in Python API 2.0), something like this will 
> do it in less than a millisecond:
>     normals = [om.MVector(0,0,1)]*100000
> Creating your id list takes about a millisecond too:
>     ids = range(100000)
> Then, like Christopher said:
>     mesh.setVertexNormals(normals, ids)
>
> Trying it on a sphere with 40,000 normals, I can create and set all the 
> normals in 0.03 seconds.
>
>
Woah , great ! Thank you 

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/8382e970-0778-4a6b-a7a9-e689a65c871d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to