--
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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/11408607-bfc6-4faa-a852-20756b39921e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 python_inside_m...@googlegroups.com.
I don't have much to offer in terms of specifics to the right api calls, but I can imagine 10k python functions calls is insanely slower than 10k C++ calls.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ec357991-0a0d-4895-8be1-729b501f0588%40googlegroups.com.
On Sat, Feb 25, 2017, 10:12 PM justin hidair <justin...@gmail.com> wrote:
Le samedi 25 février 2017 01:03:25 UTC-8, Justin Israel a écrit :I don't have much to offer in terms of specifics to the right api calls, but I can imagine 10k python functions calls is insanely slower than 10k C++ calls.
What you just said hurt my feelings lol I don't like thatHah. I'm sorry to be the bearer of bad news. But that benefit you gain in fast prototyping and expressiveness in the dynamic python language is always going to come at a cost. If you are comparing many of thousands of functions calls, attribute accesses, etc, of a dynamically typed interpreted language to a compiled statically typed language, you will find a wide gap.
--
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 python_inside_maya+unsub...@googlegroups.com.
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)]*100000Creating 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.