OpenMaya.MPxCommand Class Reference
         
    
Base class for custom commands.
 Constructors
| Signature | Parameters | Description | 
| MPxCommand() |  | Default constructor. Returns a new, empty MPxCommand object.  | 
Virtual Methods
These are methods which are called by Maya and can be overridden in the derived class to change Maya's behaviour. 
 
 
      
        
          | OpenMaya.MPxCommand.__init__ | ( |  | ) |  | 
      
 
x.__init__(...) initializes x; see help(type(x)) for signature
 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.appendToResult | ( |  | ) |  |  | 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. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.clearResult | ( |  | ) |  |  | static | 
 
Clears the command's result.
| Name: | clearResult() | 
| Parameters: | 
 | 
| Returns: | None | 
| Description: | Clears the command's result. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.currentResult | ( |  | ) |  |  | 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. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.currentResultType | ( |  | ) |  |  | static | 
 
Returns the type of the current result.
| Name: | currentResultType | 
| Parameters: | 
 | 
| Returns: | Result Type constant | 
| Description: | Returns the type of the current result. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.displayError | ( |  | ) |  |  | static | 
 
Display an error message.
| Name: | displayError(msg, showLineNumbers=False) | 
| Parameters: | msg - string showLineNumbers - bool
 | 
| Returns: | None | 
| Description: | Display an error message. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.displayInfo | ( |  | ) |  |  | static | 
 
Display an informational message.
| Name: | displayInfo(msg, showLineNumbers=False) | 
| Parameters: | msg - string showLineNumbers - bool
 | 
| Returns: | None | 
| Description: | Display an informational message. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.displayWarning | ( |  | ) |  |  | 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. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.isCurrentResultArray | ( |  | ) |  |  | 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. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.setResult | ( |  | ) |  |  | 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 | ( |  | ) |  | 
      
 
Returns the command's MSyntax object, if it has one.
| Signature: | syntax() | 
| Parameters: | 
 | 
| Returns: | MSyntax | 
| Description: | Returns the command's MSyntax object, if it has one. | 
 
 
      
        
          | 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. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.kDouble = 1 |  | static | 
 
| Name: | kDouble | 
| Type: | int | 
| Description: | 
 | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.kLong = 0 |  | static | 
 
| Name: | kLong | 
| Type: | int | 
| Description: |  | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.kNoArg = 3 |  | static | 
 
| Name: | kNoArg | 
| Type: | int | 
| Description: | 
 | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.kString = 2 |  | static | 
 
| Name: | kString | 
| Type: | int | 
| Description: | 
 | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.commandString |  | static | 
 
 Command string to be echoed to the user.
| Name: | commandString | 
| Type: | string | 
| Access: | RW | 
| Description: | Command string to be echoed to the user. | 
 
 
  
  | 
        
          | OpenMaya.MPxCommand.historyOn |  | 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. |