Wednesday, 18 May 2011

Maya Python API 2.0

Autodesk recently released major update to Python API as part of M2012 hotfix. They did really good move with focusing on python interface to API. Most class parameters can now be returned and set without use of MScriptUtil class, probably least favourite part of Python API.
After playing with Pymel which did adress many issues long time ago, I prefer using "pure" Maya API for various reasons (use least wrappers, support by Autodesk, consistency with other TDs) and this update made it easier to stay with it. Also pymel is apparently slower then directly calling API.

Link to Python API 2.0 docs is at Developer Center.

Unfortunately this is not complete conversion. Lot of classes are still missing. You simply cannot switch completely to python API 2.0, yet locally (in modules that don`t return API class objects) it can be easier to work with Maya scene and compute certain tasks, especially classes  like MMatrix and MFnMesh.
Post a Comment