The Maya API

Plugin Examples


The software shader extends things a little bit by adding in some basic diffuse lighting.


This extends the previous example by adding in ambient colour and bump mapping attributes.


This shader example extends the previous one by adding in specular lighting calculations.


This shader adds in some ray-traced reflection support into the material. This example is very similar to the devkit phong example....

    HW Shader Nodes

HW Shaders under linux seem to be pretty broken as far as I can tell. The problem I'm having is that I am unable to access any external shared objects from a plugin. For example, using fmod within a plugin to add 3D sound seems to be impossible because it will never load

The problem with HW shaders under linux is that I can't get access to any opengl extensions from within my plugins. I take heart from the fact that NVidia don't offer the CGFX plugin under linux, so i assume that i'm not the only one having this problem.

The shader's here all work under linux because they only use openGL 1.1. If anyone knows the reason why this doesn't work and has a solution, i'd be very interested to hear!!!

  Locator Node 2

An example of a locator node with a few custom attributes.

  Locator Node 3

This locator node also contains an attribute editor template to define the layout of the controls in the attribute editor

  37 New Locator Nodes

A selection of 37 random locator nodes. I was bored ok?!?....

Ahhh, a small context crisis under Win32 i'm afraid. Err, under linux the overlay works rather nicely indeed. You can only get a mild grey colour, but still; it works. Under Win32 it seems as though overlays are not supported, and the result is the gastly mess you see in the images below. In the API lasso tool example, a manual call to swap the buffers is made. In my opinion, the API example is a bit dodgy, there is a fixed version on highend 3D, but i've not tried it out to see if it works. This version runs really nicely on linux.... (i usually find it's the other way around)
  Context 1

This example impliments a very simple rectangular selection tool using MPxContext and MPxContextCommand. To use the plugin once loaded, type the following into the script editor

$context = `RectangleSelectToolContext` ;

setToolTo $context;

  Context 2

This example impliments a circular selection tool.

$context = `CircleSelectContext` ;

setToolTo $context;

  Context 3

This example extends the basic Circular context to add in User interfaces registered with MFnPlugin::registerUI

  Context 4

This is basically a slightly altered version of the lasso tool that comes with the Maya API devkit.