{"action":"opened","issue":{"url":"https://api.github.com/repos/LumaPictures/pymel/issues/31","labels_url":"https://api.github.com/repos/LumaPictures/pymel/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/LumaPictures/pymel/issues/31/comments","events_url":"https://api.github.com/repos/LumaPictures/pymel/issues/31/events","html_url":"https://github.com/LumaPictures/pymel/issues/31","id":89588819,"number":31,"title":"pymel is using OpenMaya 1.0 API, 2.0 is reputedly much faster","user":{"login":"mjmvisser","id":351739,"avatar_url":"https://avatars.githubusercontent.com/u/351739?v=3","gravatar_id":"","url":"https://api.github.com/users/mjmvisser","html_url":"https://github.com/mjmvisser","followers_url":"https://api.github.com/users/mjmvisser/followers","following_url":"https://api.github.com/users/mjmvisser/following{/other_user}","gists_url":"https://api.github.com/users/mjmvisser/gists{/gist_id}","starred_url":"https://api.github.com/users/mjmvisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjmvisser/subscriptions","organizations_url":"https://api.github.com/users/mjmvisser/orgs","repos_url":"https://api.github.com/users/mjmvisser/repos","events_url":"https://api.github.com/users/mjmvisser/events{/privacy}","received_events_url":"https://api.github.com/users/mjmvisser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-19T15:13:33Z","updated_at":"2015-06-19T15:13:33Z","closed_at":null,"body":"> Overview\r\n>\r\n> The Maya Python API 2.0 is a new version of the Maya Python API which provides a more Pythonic workflow and improved performance. Both the new and old APIs can co-exist in the same script but objects from the two different APIs cannot be used interchangeably.\r\n>\r\n> The Python API 2.0 has a number of advantages over the original API:\r\n>\r\n> * Array types are full Python sequences, including slice support.\r\n> * Methods which take Maya array parameters will usually also take native Python sequences, such as arrays and tuples. Exceptions are made in some case for performance reasons.\r\n> * The outputs of methods are usually returned in their return values, not through their parameter lists. Exceptions are made in some cases for performance reasons.\r\n> * Methods which return multiple values (e.g. MFnFluid.getResolution) return them as a tuple or list, eliminating the need for MScriptUtil.\r\nObject attributes are preferred over rather than set/get methods. For example you can now write array.sizeIncrement=64.\r\n> * There are more types of exceptions used when methods fail. Not everything is a RuntimeError, as was the case in the old API.\r\nThe new API is generally faster than the old. Up to three times faster in some cases.\r\n>\r\n> -- http://docs.autodesk.com/MAYAUL/2013/ENU/Maya-API-Documentation/python-api/"}}