WARNING AND NOTICE

All tricks in this blog are only for educational purpose. Learn these tricks only for your knowledge. Please donot try these to harm any one. We will not take any responsibility in any case. All softwares and tools on this site are here for private purposes only and If you want to use a software for business purpose, please purchase it. I do not host many of these tools. I Post links that I have found from numerous Search engines. I will not be responsible for any of harm you will do by using these tools.

Readmore

Friday, September 24, 2010

Introduction to the Maya API

Developing with Maya There are two ways to extend Maya’s functionality. The first is Maya’s C++ API. This is the suggested way to write complicated extensions or ones that require a higher level of performance. For example, the C++ API is suitable for writing dependency nodes, tools, and shaders.The second tool for extending Maya is MEL (Maya Embedded Language). MEL is a suitable for simple tasks and the creation of user interfaces. All of the user interface layout in Maya is done in MEL.Writing a complicated extension to Maya typically requires both the API and MEL. The important thing is to try and find the correct balance between C++ and MEL. Developing with MEL is much faster if the task is simple enough to warrant it.Two Core Architectures of Maya When developing with Maya’s API, there are two main units of functionality that can be added. These are dependency graph nodes and MEL commands. There are other ways to extend Maya via the API, but these two are the fundamental ones.MEL Commands Since the entire user interface of Maya is written in MEL, an excellent way to add a new feature is by writing a new MEL command. Once the new functionality is enclosed in a new MEL command, it is trivial to add a user interface via MEL using your new command.Dependency Graph Nodes The other core building block of Maya is the dependency graph. All objects in a scene and their data flow connections are represented by nodes and connections in the dependency graph. Nodes use data from their inputs to compute a suitable output. Dependency graph nodes come in different flavors. The types of nodes that can be written include the following: • Geometry deformers• Manipulators• Locators (simple DAG objects)• Dynamics fields• Dynamics emitters• Shaders (including hardware shaders)• Shapes The details of the dependency graph are covered later in the course notes. Other Plug-ins The API extends beyond nodes and commands. The following are a few other things that can be written inthe API: • Tools• File translators• IK solvers Classes in the API The following are the types of classes available in the API: • Maya objects (MObject)• Function sets (MFn… )• Proxy objects (MPx… )• Wrappers (M… )• Iterators (MIt… ) The details of what these are and how they are used may be found in the first chapter of the Maya API Developer’s Manual. Top Ten Important Classes in the API The following are ten of the most important classes in the API:1. MObject2. MPxCommand3. MPxNode (and derived classes)4. MGlobal5. MDagPath6. MItMesh*/MIt Surface*7. MSelectionList8. MIt Dag/MItDependencyGraph9. MPlug10. MDG Modifier What follows is a brief description of each. Many are described in more detail later in these notes. If any of these classes seem unfamiliar, then consider taking some time to investigate.

Download
Introduction to the Maya API.

0 comments:

Post a Comment