- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# MTemplateCreateNodeCommand< CommandClass, CommandName, NodeName > Class Template Reference

# OpenMaya - API module for common classes

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.

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.

`#include <MTemplateCommand.h>`

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

List of all members.

## Public Member Functions
virtual MStatus | doIt (const MArgList &args)
| Execution of the command.
virtual MStatus | redoIt ()
| Redo the create/delete. Search for all occurrences
virtual MStatus | undoIt ()
| Undo the create/delete. Search for all occurrences

## Member Function Documentation

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

Search for all occurrences

Execution of the command.

Parameters:

  [in] | args | command arguments

Reimplemented from MTemplateAction< CommandClass, CommandName, CommandSyntax >.