Monday, July 25, 2011

Maya API charts

These are a couple of charts that tells what methods you can use to get an object you need. I wrote them when I was writing a Maya programming book (which ended up not being published), when Maya version was 5 so they're old and the interface and behavior written there may be changed but most of them are still valid.

The first chart shows the relationship between MDagPath, MObject, MFn*, etc. The second one focuses on plugs and attributes. The term "attribute" and "plug" are distinguished strictly in the API. You can say a node *type* has attributes, not a node, so

correct: a mesh has an attribute translateX.
wrong: pCone1 has an attribute translateX.

It indicates you need two informations to get a plug for "pCone1.translateX". First, the node is "pCone1", and second, the attribute is "translateX". You'll see it on the second chart.

Disclaimer: I do not guarantee the accuracy of the information. Refer to it at your own risk.


Kumaresan said...

Very nice!
Try to update your book and publish them. I hope it may have some more interesting stuffs like this. Else try to publish/sell it as an e-book!

hohehohe2 [at] said...

Hi Kumaresan,

hmmm, I doubt if I want it. Updating it is a huge work and the return is little.