MTemplateCreateNodeCommand< CommandClass, CommandName, NodeName > Class Template Reference
[OpenMaya - API module for common classes]

#include <MTemplateCommand.h>

Inheritance diagram for MTemplateCreateNodeCommand< CommandClass, CommandName, NodeName >:

Inheritance graph
[legend]
Collaboration diagram for MTemplateCreateNodeCommand< CommandClass, CommandName, NodeName >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<class CommandClass, const char * CommandName, const char * NodeName>
class MTemplateCreateNodeCommand< CommandClass, CommandName, NodeName >

Template class for undoable commands to create/delete a node.

Helper template class which make it easier to write commands to create/delete a node.

The command is tied into an MDGModifier to create a node with undo support.

Note:
Only one such command per plug-in binary is allowed because MTemplateCreateNodeCommand_nodeHandle is a global variable.
Parameters:
  • CommandClass : derived from MPxCommand and used in the creator() method
  • CommandName : name of the command
  • NodeName : node that should be created
Examples:

lineManip.cpp, and squareScaleManip.cpp.


Public Member Functions

virtual MStatus doIt (const MArgList &args)
virtual MStatus redoIt ()
 Redo the create/delete.
virtual MStatus undoIt ()
 Undo the create/delete.

Member Function Documentation

template<class CommandClass, const char * CommandName, const char * NodeName>
virtual MStatus MTemplateCreateNodeCommand< CommandClass, CommandName, NodeName >::doIt ( const MArgList args  )  [inline, virtual]

Execution of the command.

Parameters:
[in] args command arguments

Reimplemented from MTemplateAction< ActionClass, CommandName, CommandSyntax >.


Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6