When
writing plug-ins for Maya, there are a number of different
proxy classes you can inherit from. These classes all begin
with the MPx prefix, ie, MPxFileTranslator,
MPxCommand, MPxNode etc. Within any one
plugin, you may register one or more of these types with
Maya.
I would generally recommend only using one plugin for your
full maya toolset - it makes it much easier to distribute
toolset updates to your Art Department. Another un-avoidable
aspect of using the Maya API, is that at some point, you
will end up requiring a few mel
scripts. These are usually required to create any custom
user interfaces that may be needed, or simply provide custom
menus or user interfaces.
In
this tutorial we will focus on creating our own mel functions,
and how mel interfaces with the rest of maya. We will then
proceed to make use of these mel functions to create an
automated graphics build process.
Essentially,
adding our own mel function into Maya involves deriving
our own class, from the proxy class MPxCommand.
This contains a virtual function doIt
which we need to overload to perform our required actions.
This may seem straight-forward (infact it is),
however there is an even easier way to create a simple function
- we can use MSimple.h.
[source
project]
|