Public Member Functions

MTemplateCreateNodeCommand< CommandClass, CommandName, NodeName > Class Template Reference

Search for all occurrences

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.

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

lineManip.cpp, and squareScaleManip.cpp.

#include <MTemplateCommand.h>

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

List of all members.

Public Member Functions

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

Member Function Documentation

virtual MStatus doIt ( const MArgList args) [inline, virtual]

Execution of the command.

[in]argscommand arguments

Reimplemented from MTemplateAction< CommandClass, CommandName, CommandSyntax >.