#include <MCommandResult.h>
MCommandResult collects the result returned by MGlobal::executeCommand. It can either be an int or an array of int or a double or an array of double or a string or an array of string. Use resultType to find out its type and use the appropriate getResult method to retrieve the result.
Public Types | |
enum | Type { kInvalid = 0, kInt, kIntArray, kDouble, kDoubleArray, kString, kStringArray, kVector, kVectorArray, kMatrix, kMatrixArray } |
The types of results that MEL commands can return. More... | |
Public Member Functions | |
MCommandResult (MStatus *ReturnStatus=NULL) | |
virtual | ~MCommandResult () |
Type | resultType (MStatus *ReturnStatus=NULL) const |
MStatus | getResult (int &result) const |
MStatus | getResult (MIntArray &result) const |
MStatus | getResult (double &result) const |
MStatus | getResult (MDoubleArray &result) const |
MString | stringResult (MStatus *ReturnResult=NULL) const |
MStatus | getResult (MString &result) const |
NO SCRIPT SUPPORT. | |
MStatus | getResult (MStringArray &result) const |
MStatus | getResult (MVector &result) const |
MStatus | getResult (MVectorArray &result) const |
MStatus | getResult (MDoubleArray &result, int &numRows, int &numColumns) const |
enum MCommandResult::Type |
MCommandResult::MCommandResult | ( | MStatus * | ReturnStatus = NULL |
) |
MCommandResult::~MCommandResult | ( | ) | [virtual] |
Destructor for MCommandResult.
MCommandResult::Type MCommandResult::resultType | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the type of the result.
[out] | ReturnStatus | Status code |
MStatus MCommandResult::getResult | ( | int & | result | ) | const |
Retrieves the command result which is an int.
[out] | result | Storage for the command result |
Retrieves the command result which is an int array.
[out] | result | Storage for the command result |
MStatus MCommandResult::getResult | ( | double & | result | ) | const |
Retrieves the command result which is a double.
[out] | result | Storage for the command result |
MStatus MCommandResult::getResult | ( | MDoubleArray & | result | ) | const |
Retrieves the command result which is a double array.
[out] | result | Storage for the command result |
Retrieves the command result which is a string.
[out] | ReturnStatus | Optional status code. See below. |
NO SCRIPT SUPPORT.
Retrieves the command result which is a string.
Python Notes
This method is not supported in Python. See the stringResult function which returns a string.
[out] | result | Storage for the command result |
MStatus MCommandResult::getResult | ( | MStringArray & | result | ) | const |
Retrieves the command result which is a string array.
[out] | result | Storage for the command result |
Retrieves the command result which is a vector.
[out] | result | Storage for the command result |
MStatus MCommandResult::getResult | ( | MVectorArray & | result | ) | const |
Retrieves the command result which is a vector array.
[out] | result | Storage for the command result |
MStatus MCommandResult::getResult | ( | MDoubleArray & | result, | |
int & | numRows, | |||
int & | numColumns | |||
) | const |
Retrieves the command result which is a matrix.
[out] | result | Storage for the content of the matrix (row-based) |
[out] | numRows | The number of rows in the matrix |
[out] | numColumns | The number of columns in the matrix |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |