There are a large number of example plug-ins supplied with the Maya Development Tool Kit. These are described in this chapter to help you find one that demonstrates the operation you are trying to accomplish. The following naming convention is used by the examples so you can tell what kind of plug-in the example is based on its file name.
blindComplexDataCmd |
Command which demonstrates adding more complex blind data, as a user defined data type, to an object. See blindComplexDataCmd. |
blindDoubleDataCmd |
Command which demonstrates adding blind data, as a user-defined data type, to an object. See blindDoubleDataCmd. |
blindShortDataCmd |
Command which demonstrates adding blind data to an object. See blindShortDataCmd. |
closestPointCmd |
command that shows how to use the MMeshIntersector class to find the closest point between a point light and a mesh |
closestPointOnCurve |
Command that sets the weights of the CVs of a cluster according to a mathematical function. See closestPointOnCurve. |
convertBumpCmd |
Command that demonstrates the steps necessary to create a non-linear animation clip using the API. See convertBumpCmd. |
convertEdgesToContainedFacesCmd |
Command that converts a selection of edges into a selection of faces that interconnect. See convertEdgesToContainedFacesCmd. |
convertVerticesToContainedEdgesCmd |
Command that converts a selection of vertices into a selection of edges that interconnect the original vertices. See convertVerticesToContainedEdgesCmd. |
convertVerticesToContainedFacesCmd |
Command that converts a selection of vertices into a selection of faces that interconnect the original vertices. See convertVerticesToContainedFacesCmd. |
cvExpandCmd |
Command that splits NURBS CV selections up into one string per selected CV. See cvExpandCmd. |
cvPosCmd |
Return the world or local space position of a NURBS CV or a poly vertex. See cvPosCmd. |
dagPoseInfoCmd |
Command that demonstrates how to extract DAG pose info for a skeleton’s bind pose, or for other poses created using the “dagPose” command. See dagPoseInfoCmd. |
deletedMsgCmd |
A new example that demonstrates each of the node deletion callbacks available. |
deletedMsgCmd |
command that demonstrates each of the node deletion callbacks that are available in the API. The command registers callbacks on selected nodes that will trigger messages in the console when the command is run |
dynExprFieldTest |
A new example that demonstrates the per particle field attributes support that has been added to the class MPxFieldNode. |
exportJointClusterDataCmd |
command that demonstrates how to find all joint cluster nodes and uses the MFnWeightGeometryFilter function set and MItGeometry iterator to export weights per CV for each geometry deformed by each joint cluster. |
exportSkinClusterDataCmd |
command that exports smooth skin data to an alternate format |
findFileTexturesCmd |
locate the file texture nodes in a scene |
findTexturesPerPolygonCmd |
locate the file texture nodes assigned to each polygon |
flipUVCmd |
demonstration the use of the MPxPolyTweakUVCommand class to manipulate UVs |
helix2Cmd |
command which implements undo and redo |
helixTool |
tool which uses OpenGL to draw out guidelines |
helloCmd |
trivial command that takes arguments |
helloWorldCmd |
first simple command |
idleTest |
display the attribute dependencies within a node |
instanceCallbackCmd |
A new example that demonstrates listening to instance add and remove messages. |
instancerListCmd |
demonstrates how to use the MFnInstancer and MItInstancer classes to enumerate all particle instances in a scene. |
intersectCmd |
an example that demonstrates how to find the intersection points between a mesh and a spotlight. This example demonstrates the accelerated intersection methods of MFnMesh |
command to query light linking information |
|
command that produces a list of all the holes in each selected poly mesh |
|
demonstrates the API callbacks for node and plug locking |
|
command which implements mouse selection |
|
demonstrates the use of the high-level polygon API methods that have been added to MFnMesh |
|
meshReorderCmd |
command that will re-index a polygon mesh based on a user defined starting face |
command to animate an object along a motion path |
|
command that evaluates the position of a keyframed object over time and draws a motion path curve |
|
command that moves CVs to the origin |
|
command which demonstrates walking the dependency graph |
|
command that adds a callback for all the nodes on the active selection list |
|
command that uses particle ID information from the API to derive a set of NURBS curves from the position of particles over time |
|
demonstrates the use of the new MFnParticleSystem class for retrieving particle information |
|
pfxInfoCmd |
an example that demonstrates how to extract the render line information from Maya® Paint Effects™ |
command to pick objects by name |
|
both a MEL command and a DG node that computes the worldspace position and normal on a poly mesh |
|
A new example that demonstrates the use of the MPolyMessage class to listen to vertex, edge and face component id changes. |
|
command to create polygons |
|
A new example that demonstrates the use of the MProgressWindow class. |
|
command to find useful information about the referenced files in a scene |
|
A new example that demonstrates the immediate feedback setting that has been added to the startRender() methods of the MRenderView class. |
|
command which demonstrates walking the DAG |
|
command which demonstrates walking the DAG as well as using syntax objects to parse the arguments to the command |
|
command to move objects in a spiral |
|
command to unshare or “split” select UVs on a poly mesh |
|
command that creates a NURBS surface from CVs and knots using the MFnNurbsSurface function set |
|
command which modifies the CV positions of NURBS surfaces or the vertex positions of polygons in order to twist the surface around the y-axis |
|
threadTestCmd |
command that shows how to use the MThreadPool thread class |
threadTestWithLocksCmd |
command that shows how to use the MThreadPool and MSpinLock threading classes |
command to translate objects |
|
A new example that demonstrates the use of the new Undo and Redo events that have been added to the MEventMessage class. |
|
A new example that demonstrates the use of the MUserEventMessage class. This example allows the creation, removal and posting of user-defined events identified by strings. |
|
command that demonstrates how user-defined messages can be used. The command supports options to register, deregister, and post named events through the API. This example uses callbacks that simply print a message when they are entered. |
|
viewCallbackTest |
an example that demonstrates how to listen to the pre render, post render, view destroyed callbacks |
demonstrates the use of the MFnVolumeLight class |
|
command that prints API type information about objects |
|
command to zoom the view through a camera |
Dependency Graph Node Plug-ins
a new example that demonstrates the use of the MPxNode::setDependentsDirty() method. This new method allows for attributeAffects() relationships involving dynamic and non-dynamic (i.e. static) Maya attributes. |
|
an example of a dependency node that creates a polygonal mesh from scratch and outputs that mesh in a dependency graph attribute. |
|
an example of a shape node that registers a new kind of polygonal mesh, as well as geometry data specific for the shape and a node that can create this new shape type |
|
apiSimpleShape |
an example of a shape node that demonstrates how to work with components. Uses the MPxComponentShape class. |
arcLenNode | a simple example of a node that takes geometry as input |
a simple node which performs an algebraic computation |
|
a more complex procedural animation example |
|
closestPointOnCurve | command that sets the weights of the CVs of a cluster according to a mathematical function |
a complex example that demonstrates how to use conversion functions with a scale manipulator to control vertex positions. |
|
curveArrowsNode |
demonstrates the use of transparency and draw “last” functionality of MPxLocatorNode |
customImagePlane |
demonstrates how to create a user defined image plane |
an example of a locator dependency node that draws colored points on top of each CV of a NURBS surface. |
|
allows vertex color (CPV) to be software rendered |
|
an example that demonstrates how to implement a ramp attribute on a custom node |
|
an example of a locator dependency node that has a corresponding manipulator. The Show Manip Tool can be used when the footPrint locator is selected to show the footPrint manipulator. |
|
an example of a locator dependency node. Locators are actually DAG nodes that have draw methods that the user may override. This particular locator draws a foot print. |
|
an example of a real loft dependency node that builds a NURBS surface from an array of NURBS curves. |
|
genericAttributeNode |
demonstrates how to create and use generic attributes on a node. |
geometrySurfacConstraint |
demonstrates how to create a user defined constraint |
a simple multi-purpose procedural node |
|
a complex example of geometry modification in a dependency node, along with a command that does low level dependency graph access to hook up the node |
|
an example of a dependency node that uses the MArrayDataBuilder class. |
|
class that monitors a given node |
|
an example of a deformer dependency node that offsets vertices according to the CV’s weights. |
|
particleAttrNode |
demonstrates how to define a custom node which maps per-particle data to a particle shape |
pnTrianglesNode | ATI Radeon specific hardware shader plug-in |
both a MEL command and a DG node that computes the worldspace position and normal on a poly mesh |
|
an example of how to query a subdivision surface as an input to a dependency node |
|
an example of how to add user defined triangulation for meshes using the poly API class, MPxPolyTrg |
|
an example of a simple shape node that implements a quadric shape using the OpenGL gluQuadric functions. |
|
an example that demonstrates how to implement a MPxTransform that defines a rocking motion. |
|
an example that demonstrates how to implement a MPxTransform that defines a rocking motion and performs checks on the user entered values |
|
an example that demonstrates the different settings for the rotate manipulator. |
|
a dependency graph node that procedurally generates sea shells and outputs them as meshes. |
|
a node that implements a user-defined loft function on a curve with construction history. Also demonstrates how to pass geometry (a NURBS surface) to an internal dependency node. |
|
a simple procedural animation example |
|
stringFormatNode |
demonstrates how to use strings as input and output attributes |
this example demonstrates how to use the pointOnSurface manipulator to modify vertices near the manipulator position on the surface |
|
a contrived example that attaches all existing user-defined manipulators to a node. |
|
an example of a dependency node that uses the translate attribute as both an input and output. Demonstrates how to transfer all of X, Y, and Z attributes via a single dependency graph connections. It also contains an example attribute editor template. |
|
an example that demonstrates how to work with multi of multi attributes as is found in the weightList attribute of a deformer |
|
an example of a deformer dependency node that twists the deformed vertices around the y-axis. |
User-defined dependency graph nodes—creating dynamics nodes
These user-defined dependency graph nodes create dynamics nodes derived from MPxEmitterNode, MPxSpringNode, and MPxFieldNode.
blastCmd |
demonstrates how to use the off screen rendering API extension. |
demonstrates the use of blind data to provide color information to a hardware shading node. |
|
a hardware shader plug-in with many advanced possibilities. |
|
demonstrates how to work with render callbacks. |
|
demonstrates how to render a full image to the Render View window using the MRenderView class. |
|
demonstrates how to use the MRenderView class to update the currently selected Render Region in Maya's Render View. |
|
sampleCmd | demonstrates how to sample shading groups or nodes using MRenderUtil::sampleShadingNetwork(). |
demonstrates how to sample shading groups or nodes using MRenderUtil::sampleShadingNetwork() to assign colors to a particle object. |
|
ShadingConnection |
a class that stores useful information about a shader’s attribute, including what’s connected upstream of it. |
ShapeMonitor |
a class that watches shape or texture nodes and keeps track of changes since the last export. |
demonstrate modifying uvCoord and refPointCamera from within a texture plug-in |
|
hwManagedTextureShader |
demonstrates how to manage texture caching efficiently |
OpenGLViewportRenderer |
demonstrates how to override the Maya viewport drawing |
D3DViewportRenderer |
demonstrates how Direct3D can be used to render into a Maya viewport (Windows only) |
The following lists several miscellaneous plug-ins.
display which “conditions” are being changed inside Maya |
|
ddsFloatReader |
demonstrates how to define a .dds float file format reader |
display which “events” are being changed inside Maya |
|
filterAsciiFile |
demonstrates how to control the filtering of a Maya ASCII file |
hairCollisionSolver |
demonstrates how to use MHairSystem to override Maya’s object to hair collision algorithm |
create a new Motif window containing a button that creates a helix when pressed. This plug-in is only available on Linux. |
|
idleTest | using both idle messages and UI deleted messages in a plug-in |
extracts information from an IFF image file. |
|
extracts a pixel value from an IFF image file. |
|
converts an IFF image file to a PPM image file. |
|
creates a user defined midi input device for the JL-Cooper midi VCR control box. This plug-in is only available on Linux. |
|
an example file translator that defines its own magic number and reads MEL commands |
|
an example of a file translator that approximates the MayaAscii file |
|
A simple manipulator that demonstrates how the freePointTriad and distance manipulators can be used with an user-defined context. |
|
Selection-action tool that performs translations in orthographic views as well as allowing the user to type in precise translation values to while in the move tool. |
|
Selection-action tool that performs translations in orthographic views. |
|
pnTrianglesNode | This node is a simple example of how to query a subdivision surface as an input to a dependency node. |
simpleImageFile |
demonstrates how to define a new image file format |
an example of a simple user defined single-bone IK-solver in the x-y plane that is registered through createNode. By registering the plug-in solver through createNode, the registration mechanism is the same as non-default IK solvers such as the ikMCsolver. |
|
tiffFloatReader |
demonstrates how to define a .tif float file format reader |
uses OpenGL to capture the current 3D view and write it into a PPM file |
Shader source code examples are provided in Shader source code examples.
The following table lists the source for several of the system plug-ins shipped with Maya. Unlike most of the other examples, these are complex samples of real production plug-ins.
Detailed documentation for each of these can be found in the Translators guide as compiled versions of these are shipped as part of the Maya package. The following shows the current list.