Contents
API Guide
Maya API introduction
Introduction
Loading a Plug-in
Unloading a plug-in
Writing a simple plug-in
Important plug-in features
Interacting with Maya
MObject
Wrappers
Objects and Function Sets
Naming Conventions
Adding arguments
Error checking
MStatus class
Error logging
Selecting with the API
Overview of selecting with the API
MGlobal::setActiveSelectionList()
MSelectionList
MItSelectionList
setObject() method
MFn::Type enumeration
MGlobal::selectByName()
Command plug-ins
Overview of adding commands to Maya
Registering commands
MFnPlugin
initializePlugin()
uninitializePlugin()
Creator methods
MPxCommand
Returning results to MEL
Syntax objects
Flags
Contexts
MPxContext
MPxContextCommand
Tool property sheets
MPxToolCommand
Attaching a plug-in to a Maya menu
DAG Hierarchy
Overview of the DAG Hierarchy
Nodes
Transforms and shapes
DAG paths
Generalized instancing
Transforms with multiple shapes
DAG walking example
Writing a Software Shading Node
Overview of shading node plug-ins
Writing a shading node plug-in
Anatomy of a shading node plug-in
InterpNode example code walkthrough
Shading nodes classification
Shading node icons for Hypershade
Adding a custom shading node to the Hypershade
Special shading nodes
SuperSampling within shading nodes
Evaluating shading nodes outside of the rendering context
Dependency graph plug-ins
Overview of dependency graph plug-ins
Parent class descriptions
The basics
Dependency Graph (DG) nodes
Nodes
Attributes and plugs
Complex Attributes
Data blocks
Data handles
Data creators
Compute methods
A more complex example
MPxNode and its derived classes
Manipulators
Overview of creating manipulators
What is a manipulator?
Base manipulators
Writing a manipulator
Manipulator containers
Communication between manipulators and nodes
Connect manipulators to the Show Manipulator Tool
Shapes
Shapes in Maya
Shape classes
Writing a shape
Drawing and refresh
Selection
Components
Tweaks and internal attributes
Geometry data
File IO
Deformers
Marking Menus
Example Shapes
Writing a Hardware Shading Node
Overview of hardware shading node plug-ins
Implementing a hardware shading node plug-in
A hardware shading node plug-in example
Improving the performance of hardware shaders
Hardware Shading node plug-in examples
Writing a Custom Transform Node
Overview of custom transforms
Implementing a custom transform
Example custom transform
Custom Transform node examples
Writing a Deformer Node
Overview of Deformers
Implementing a Deformer Node
Deformer Node Example
Deformer Examples
Writing File Translators
Overview of File Translators
Implementing a File Translator
Accessing MEL commands
File Translator Examples
File Translator Examples in the developer kit
Multithreading plug-ins
Introduction
Data and Task Parallelism
Threads
Locks
OpenMP
Intel Threading Building Blocks (TBB)
Threading Challenges
Memory allocation
Threading and Maya
Other types of parallelism
Python threading and Maya
Third party tools
API Classes and plug-ins
Mac OS X platform specific pthreads issues
Vendor-specific OpenMP Issues
Polygon API
Overview of Polygon API
How polygons are handled internally
The five basic polygonal API classes
Construction History and Tweaks
polyModifierCmd example
splitUVCmd example
Poly exporter plug-ins
Working with Qt
Overview of Maya's Qt UI
Using the loadUI Command
Using Qt in Plug-ins
Setting up your build environment
Introduction to building plug-ins and applications
Compiler Requirements
Linux environments (64-bit)
Linux compiler requirement
Using a debugger to debug your plug-ins
Windows environment (32-bit and 64-bit)
Installing the Maya Plug-in Wizard
Maya Plug-in Wizard 2.0(32 bit version)
Maya Plug-in Wizard 2.0(64 bit version)
Mac OS X environment
Configuring Qt for use in Maya plug-ins
Maya Python API
Introduction to Maya Python API
The Development Kit
Using the Maya Python API
Differences Between Maya's C++ and Python APIs
Distributing Maya Plug-ins
Distributing individual files
Distributing Multi-File Modules
Limitations of Modules
Shared Libraries
mental ray Shaders
Technical Notes
Generic Attributes
Threading and Maya API
Internationalizing plug-ins
Overview of the Maya API Internationalization Architecture
Internationalization Process
Localization Process
Example code
Translated version of the closestPointOnCurve.pres.mel resource file
Example Plug-ins
Overview of example plug-ins
Example stand-alone applications
Example C++ plug-in descriptions
Example stand-alone application descriptions
Shader source code examples
Example Scripted Plug-ins
Appendices
Appendix A: NURBS Geometry
Appendix B: Dependency graph rendering nodes
Appendix C: Rendering attributes
Appendix D: Frequently asked questions
Appendix E: API and Devkit limitations
Appendix F: Adding Image Plug-ins