Python API 2.0 Reference: OpenMayaUI.MPxToolCommand Class Reference

+ Inheritance diagram for OpenMayaUI.MPxToolCommand:

Public Member Functions

__init__ ()
 
cancel ()
 
doFinalize ()
 
doIt ()
 
finalize ()
 
- Public Member Functions inherited from OpenMaya.MPxCommand
__init__ ()
 
doIt ()
 
hasSyntax ()
 
isUndoable ()
 
redoIt ()
 
syntax ()
 
undoIt ()
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenMaya.MPxCommand
appendToResult ()
 
clearResult ()
 
currentResult ()
 
currentResultType ()
 
displayError ()
 
displayInfo ()
 
displayWarning ()
 
isCurrentResultArray ()
 
setResult ()
 
- Static Public Attributes inherited from OpenMaya.MPxCommand
int kDouble = 1
 
int kLong = 0
 
int kNoArg = 3
 
int kString = 2
 
- Properties inherited from OpenMaya.MPxCommand
 commandString
 
 historyOn
 

Detailed Description

Base class for custom tool commands.

Method resolution order:
-   MPxToolCommand
-   OpenMaya.MPxCommand
-   __builtin__.object

Constructor & Destructor Documentation

OpenMayaUI.MPxToolCommand.__init__ ( )
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Member Function Documentation

OpenMayaUI.MPxToolCommand.cancel ( )
cancel() -> None

This method cancels the command.
The user should override this method when the original program state
needs to be restored.
OpenMayaUI.MPxToolCommand.doFinalize ( )
doFinalize() -> None

Call this method with an MArgList representing your command.
This method will register the command with the undo manager
for journalling.

* command (MArgList) Reference representing an equivalent
OpenMayaUI.MPxToolCommand.doIt ( )
Called by Maya to execute the command.
OpenMayaUI.MPxToolCommand.finalize ( )
finalize() -> None

This method is used to create a string representing the command
and its arguments.
Users should override this method and contruct an MArgList and
then pass it to <b>doFinalize</b> for journalling.