Public Member Functions | Static Public Member Functions

MTemplateAction< ActionClass, CommandName, CommandSyntax > Class Template Reference

Search for all occurrences

Detailed Description

template<class ActionClass, const char * CommandName, MCreateSyntaxFunction CommandSyntax>
class MTemplateAction< ActionClass, CommandName, CommandSyntax >

Template class for non undoable actions.

Helper template class which make writing not undoable actions easier.

Parameters:
  • ActionClass : derived from MPxCommand and used in the creator() method
  • CommandName : name of the command
  • CommandSyntax : function pointer to syntax creator

#include <MTemplateCommand.h>

Inheritance diagram for MTemplateAction< ActionClass, CommandName, CommandSyntax >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  MTemplateAction ()
  Default constructor.
virtual MStatus  doIt (const MArgList &)
  Execution of the action. Default behaviour is failure.

Static Public Member Functions

static void *  creator ()
  Method called by Maya to create an instance of this class.
static MStatus  registerCommand (MObject obj)
  Plug-in registration method.
static MStatus  deregisterCommand (MObject obj)
  Plug-in dregistration method.

Member Function Documentation

static MStatus registerCommand ( MObject  obj ) [inline, static]

Plug-in registration method.

Parameters:
[in] obj Plug-in object taken from the initializePlugin() entry point.
static MStatus deregisterCommand ( MObject  obj ) [inline, static]

Plug-in dregistration method.

Parameters:
[in] obj Plug-in object taken from the initializePlugin() entry point.