Python API fast enough for custom modeling only modifiers (deformers)?

41 views
Skip to first unread message

Deepak Seeni

unread,
Feb 16, 2019, 7:23:14 PM2/16/19
to Python Programming for Autodesk Maya
Hey Guys,

I've been learning Maya's python API and was keen on experimenting with simple non-real time custom deformers for modeling purposes. For non-real time deformers for modeling purposes, similar to the modifier stack in Max or Blender (Things like the edge split modifier) would the Python API be fast enough?

I wanted to start with an edge split deformer.

I'm assuming yes, since it's not for real time display, like on a rig or something. I'd use these tools mainly in modeling, similar to how I'd use wrap/shrink wrap/lattice.

What do you guys think?

Michael Boon

unread,
Feb 18, 2019, 8:12:46 PM2/18/19
to Python Programming for Autodesk Maya
It really depends on the complexity of your meshes and your scenes. 

Speaking very generally
- Until you profile your code and understand what is causing any slowness, Python vs C++ will probably make less difference than the way your code is written.
- Sensibly-written Python might be (really roughly) 10x slower than C++, and still 10x faster than MEL.
- Bear in mind that Python plugins can't be run in parallel, while well-written C++ plugins will benefit from Maya parallel mode.
- Also bear in mind that the Python API is not quite complete. There are some things you can only do in C++.

I'd go for it though. If you're not exactly sure how you're going to implement your design, and not already comfortable in C++, you might benefit a lot from the faster turnaround and easier debugging of Python, and you can always port your code to C++ once it works.

Deepak Seeni

unread,
Feb 19, 2019, 6:23:34 PM2/19/19
to Python Programming for Autodesk Maya
Thanks Michael!
Yeah It seems sensible then as a new tool developer to then prototype and design with Python and then branch out into C++ once I identify bottlenecks. 
Reply all
Reply to author
Forward
0 new messages