| Python API 2.0 Reference
    | 
 Inheritance diagram for OpenMaya.MPxCommand:
 Inheritance diagram for OpenMaya.MPxCommand:| Public Member Functions | |
| def | __init__ () | 
| def | doIt () | 
| def | hasSyntax () | 
| def | isUndoable () | 
| def | redoIt () | 
| def | syntax () | 
| def | undoIt () | 
| Static Public Member Functions | |
| def | appendToResult () | 
| def | clearResult () | 
| def | currentResult () | 
| def | currentResultType () | 
| def | displayError () | 
| def | displayInfo () | 
| def | displayWarning () | 
| def | isCurrentResultArray () | 
| def | setResult () | 
| Static Public Attributes | |
| Result Types | |
| int | kDouble = 1 | 
| int | kLong = 0 | 
| int | kNoArg = 3 | 
| int | kString = 2 | 
| Properties | |
| commandString = property(...) | |
| historyOn = property(...) | |
Base class for custom commands.
| Signature | Parameters | Description | 
|---|---|---|
| MPxCommand() | Default constructor. Returns a new, empty MPxCommand object. | 
These are methods which are called by Maya and can be overridden in the derived class to change Maya's behaviour.
| def OpenMaya.MPxCommand.__init__ | ( | ) | 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
| 
 | static | 
Append a value to the result to be returned by the command.
| Name: | appendToResult(value) | 
| Parameters: | value - bool, int, float, string, sequence of numerics or sequence of strings | 
| Returns: | None | 
| Description: | Append a value to the result to be returned by the command. | 
| 
 | static | 
Clears the command's result.
| Name: | clearResult() | 
| Parameters: | |
| Returns: | None | 
| Description: | Clears the command's result. | 
| 
 | static | 
Returns the command's current result.
| Name: | currentResult() | 
| Parameters: | |
| Returns: | bool, int, float, string, or a list of ints, floats or strings | 
| Description: | Returns the command's current result. | 
| 
 | static | 
Returns the type of the current result.
| Name: | currentResultType | 
| Parameters: | |
| Returns: | Result Type constant | 
| Description: | Returns the type of the current result. | 
| 
 | static | 
Display an error message.
| Name: | displayError(msg, showLineNumbers=False) | 
| Parameters: | msg - string showLineNumbers - bool | 
| Returns: | None | 
| Description: | Display an error message. | 
| 
 | static | 
Display an informational message.
| Name: | displayInfo(msg, showLineNumbers=False) | 
| Parameters: | msg - string showLineNumbers - bool | 
| Returns: | None | 
| Description: | Display an informational message. | 
| 
 | static | 
Display a warning message.
| Name: | displayWarning(msg, showLineNumbers=False) | 
| Parameters: | msg - string showLineNumbers - bool | 
| Returns: | None | 
| Description: | Display a warning message. | 
| OpenMaya.MPxCommand.doIt | ( | ) | 
Called by Maya to execute the command.
| Signature: | doIt(args) | 
| Parameters: | args - MArgList | 
| Returns: | None | 
| Description: | Called by Maya to execute the command. | 
| OpenMaya.MPxCommand.hasSyntax | ( | ) | 
Called by Maya to determine if the command provides an MSyntax object describing its syntax.
| Signature: | hasSyntax() | 
| Parameters: | |
| Returns: | bool | 
| Description: | Called by Maya to determine if the command provides an MSyntax object describing its syntax. | 
| 
 | static | 
Returns true if the command's current result is an array of values.
| Name: | isCurrentResultArray() | 
| Parameters: | |
| Returns: | bool | 
| Description: | Returns True if the command's current result is an array of values. | 
| OpenMaya.MPxCommand.isUndoable | ( | ) | 
Called by Maya to determine if the command supports undo.
| Signature: | isUndoable() | 
| Parameters: | |
| Returns: | bool | 
| Description: | Called by Maya to determine if the command supports undo. | 
| OpenMaya.MPxCommand.redoIt | ( | ) | 
Called by Maya to redo a previously undone command.
| Signature: | redoIt() | 
| Parameters: | |
| Returns: | None | 
| Description: | Called by Maya to redo a previously undone command. | 
| 
 | static | 
Set the value of the result to be returned by the command.
| Name: | setResult(value) | 
| Parameters: | value - bool, int, float, string, sequence of numerics or sequence of strings | 
| Returns: | None | 
| Description: | Set the value of the result to be returned by the command. | 
| OpenMaya.MPxCommand.syntax | ( | ) | 
| OpenMaya.MPxCommand.undoIt | ( | ) | 
Called by Maya to undo a previously executed command.
| Signature: | undoIt() | 
| Parameters: | |
| Returns: | None | 
| Description: | Called by Maya to undo a previously executed command. | 
| 
 | static | 
| Name: | kDouble | 
| Type: | int | 
| Description: | 
| 
 | static | 
| Name: | kLong | 
| Type: | int | 
| Description: | 
| 
 | static | 
| Name: | kNoArg | 
| Type: | int | 
| Description: | 
| 
 | static | 
| Name: | kString | 
| Type: | int | 
| Description: | 
| 
 | static | 
Command string to be echoed to the user.
| Name: | commandString | 
| Type: | string | 
| Access: | RW | 
| Description: | Command string to be echoed to the user. | 
| 
 | static | 
Determines if construction history is on for the command.
| Name: | historyOn | 
| Type: | bool | 
| Access: | RW | 
| Description: | Determines if construction history is on for the command. |