#include <MFnNumericData.h>
Numeric data function set.
MFnNumericData allows the creation and manipulation of numeric data objects for use in the dependency graph. Normally, data objects are not required for the transmission of numeric data. The graph supports numeric types directly (see the methods of MDataHandle).
Numeric data objects are useful if you have an attribute that accepts generic data. A generic attribute can accept multiple types of data, so you cannot hardwire it to accept a specific type of numeric data. So, generic attributes can only accept numeric data in the form of actual data objects.
This function set only supports numeric data with multiple components, such as a pair of floats or a triple of integers. Single numeric values can be retrieved directly using MPlug or MDataHandle.
Public Types | |
enum | Type { kInvalid, kBoolean, kByte, kChar, kShort, k2Short, k3Short, kLong, kInt = kLong, k2Long, k2Int = k2Long, k3Long, k3Int = k3Long, kInt64, kFloat, k2Float, k3Float, kDouble, k2Double, k3Double, k4Double, kAddr, kLast } |
Supported numerical types. More... | |
Public Types inherited from MFnData | |
enum | Type { kInvalid, kNumeric, kPlugin, kPluginGeometry, kString, kMatrix, kStringArray, kDoubleArray, kFloatArray, kIntArray, kPointArray, kVectorArray, kMatrixArray, kComponentList, kMesh, kLattice, kNurbsCurve, kNurbsSurface, kSphere, kDynArrayAttrs, kDynSweptGeometry, kSubdSurface, kNObject, kNId, kAny, kLast } |
Types of dependency graph data. More... | |
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. More... | |
virtual | ~MFnNumericData () |
Destructor. | |
MFnNumericData () | |
Default constructor. | |
MFnNumericData (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
MObject | create (Type dataType, MStatus *ReturnStatus=NULL) |
Creates a new data object of the given type. More... | |
Type | numericType (MStatus *ReturnStatus=NULL) |
Returns the type of the numeric data object. More... | |
MStatus | getData (short &val1, short &val2) |
NO SCRIPT SUPPORT. More... | |
MStatus | getData (int &val1, int &val2) |
NO SCRIPT SUPPORT. More... | |
MStatus | getData (float &val1, float &val2) |
NO SCRIPT SUPPORT. More... | |
MStatus | getData (double &val1, double &val2) |
NO SCRIPT SUPPORT. More... | |
MStatus | getData (short &val1, short &val2, short &val3) |
NO SCRIPT SUPPORT. More... | |
MStatus | getData (int &val1, int &val2, int &val3) |
NO SCRIPT SUPPORT. More... | |
MStatus | getData (float &val1, float &val2, float &val3) |
NO SCRIPT SUPPORT. More... | |
MStatus | getData (double &val1, double &val2, double &val3) |
NO SCRIPT SUPPORT. More... | |
MStatus | getData (double &val1, double &val2, double &val3, double &val4) |
NO SCRIPT SUPPORT. More... | |
MStatus | setData (short val1, short val2) |
NO SCRIPT SUPPORT. More... | |
MStatus | setData (int val1, int val2) |
NO SCRIPT SUPPORT. More... | |
MStatus | setData (float val1, float val2) |
NO SCRIPT SUPPORT. More... | |
MStatus | setData (double val1, double val2) |
NO SCRIPT SUPPORT. More... | |
MStatus | setData (short val1, short val2, short val3) |
NO SCRIPT SUPPORT. More... | |
MStatus | setData (int val1, int val2, int val3) |
NO SCRIPT SUPPORT. More... | |
MStatus | setData (float val1, float val2, float val3) |
NO SCRIPT SUPPORT. More... | |
MStatus | setData (double val1, double val2, double val3) |
NO SCRIPT SUPPORT. More... | |
MStatus | setData (double val1, double val2, double val3, double val4) |
NO SCRIPT SUPPORT. More... | |
MFnNumericData (const MObject &object, MStatus *ReturnStatus=NULL) | |
NO SCRIPT SUPPORT. More... | |
MStatus | getData2Short (short &val1, short &val2) |
Gets the stored value of this data object as a pair of short integers. More... | |
MStatus | getData2Int (int &val1, int &val2) |
Gets the stored value of this data object as a pair of int integers. More... | |
MStatus | getData2Float (float &val1, float &val2) |
Gets the stored value of this data object as a pair of floats. More... | |
MStatus | getData2Double (double &val1, double &val2) |
Gets the stored value of this data object as a pair of doubles. More... | |
MStatus | getData3Short (short &val1, short &val2, short &val3) |
Gets the stored value of this data object as a triple of short integers. More... | |
MStatus | getData3Int (int &val1, int &val2, int &val3) |
Gets the stored value of this data object as a triple of int integers. More... | |
MStatus | getData3Float (float &val1, float &val2, float &val3) |
Gets the stored value of this data object as a triple of floats. More... | |
MStatus | getData3Double (double &val1, double &val2, double &val3) |
Gets the stored value of this data object as a triple of doubles. More... | |
MStatus | getData4Double (double &val1, double &val2, double &val3, double &val4) |
Gets the stored value of this data object as a quadruple of doubles. More... | |
MStatus | setData2Short (short val1, short val2) |
Sets the stored value of this data object as a pair of short integers. More... | |
MStatus | setData2Int (int val1, int val2) |
Sets the stored value of this data object as a pair of int integers. More... | |
MStatus | setData2Float (float val1, float val2) |
Sets the stored value of this data object as a pair of floats. More... | |
MStatus | setData2Double (double val1, double val2) |
Sets the stored value of this data object as a pair of doubles. More... | |
MStatus | setData3Short (short val1, short val2, short val3) |
Sets the stored value of this data object as a triple of short integers. More... | |
MStatus | setData3Int (int val1, int val2, int val3) |
Sets the stored value of this data object as a triple of int integers. More... | |
MStatus | setData3Float (float val1, float val2, float val3) |
Sets the stored value of this data object as a triple of floats. More... | |
MStatus | setData3Double (double val1, double val2, double val3) |
Sets the stored value of this data object as a triple of doubles. More... | |
MStatus | setData4Double (double val1, double val2, double val3, double val4) |
Sets the stored value of this data object as a quadruple of doubles. More... | |
Public Member Functions inherited from MFnData | |
virtual | ~MFnData () |
Destructor. | |
MFnData (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
MFnData () | |
Default class constructor. | |
MFnData (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
Public Member Functions inherited from MFnBase | |
virtual | ~MFnBase () |
Class Destructor. More... | |
bool | hasObj (MFn::Type) const |
Determines whether or not the Function Set is compatible with the specified Maya Object within the API RTTI system. More... | |
bool | hasObj (const MObject &) const |
Determines whether or not the Function Set is compatible with the specified Maya Object within the API RTTI system. More... | |
MObject | object (MStatus *ReturnStatus=NULL) const |
Returns the MObject that is attached to the Function Set. More... | |
virtual MStatus | setObject (MObject &object) |
Attaches the Function Set to the specified Maya Object. More... | |
virtual MStatus | setObject (const MObject &object) |
NO SCRIPT SUPPORT. More... | |
Protected Member Functions | |
virtual const char * | className () const |
Class name. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from MFnBase | |
static const char * | className () |
Returns the name of this class. More... | |
enum Type |
Supported numerical types.
MFnNumericData | ( | MObject & | object, |
MStatus * | ReturnStatus = NULL |
||
) |
MFnNumericData | ( | const MObject & | object, |
MStatus * | ReturnStatus = NULL |
||
) |
|
virtual |
|
protectedvirtual |
Creates a new data object of the given type.
Only pair and triples of numeric data may be created (eg k3Float).
[in] | dataType | data type of object to create |
[out] | ReturnStatus | return status |
MFnNumericData::Type numericType | ( | MStatus * | ReturnStatus = NULL | ) |
Returns the type of the numeric data object.
[out] | ReturnStatus | return status |
MStatus getData | ( | short & | val1, |
short & | val2 | ||
) |
NO SCRIPT SUPPORT.
Gets the stored value of this data object as a pair of short integers.
The data object must have been created as a pair of short integers for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
MStatus getData | ( | int & | val1, |
int & | val2 | ||
) |
NO SCRIPT SUPPORT.
Gets the stored value of this data object as a pair of int integers.
The data object must have been created as a pair of int integers for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
MStatus getData | ( | float & | val1, |
float & | val2 | ||
) |
NO SCRIPT SUPPORT.
Gets the stored value of this data object as a pair of floats.
The data object must have been created as a pair of floats for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
MStatus getData | ( | double & | val1, |
double & | val2 | ||
) |
NO SCRIPT SUPPORT.
Gets the stored value of this data object as a pair of doubles.
The data object must have been created as a pair of doubles for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
MStatus getData | ( | short & | val1, |
short & | val2, | ||
short & | val3 | ||
) |
NO SCRIPT SUPPORT.
Gets the stored value of this data object as a triple of short integers.
The data object must have been created as a pair of short integers for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
MStatus getData | ( | int & | val1, |
int & | val2, | ||
int & | val3 | ||
) |
NO SCRIPT SUPPORT.
Gets the stored value of this data object as a triple of int integers.
The data object must have been created as a triple of int integers for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
MStatus getData | ( | float & | val1, |
float & | val2, | ||
float & | val3 | ||
) |
NO SCRIPT SUPPORT.
Gets the stored value of this data object as a triple of floats.
The data object must have been created as a triple of floats for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
MStatus getData | ( | double & | val1, |
double & | val2, | ||
double & | val3 | ||
) |
NO SCRIPT SUPPORT.
Gets the stored value of this data object as a triple of doubles.
The data object must have been created as a triple of doubles for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
MStatus getData | ( | double & | val1, |
double & | val2, | ||
double & | val3, | ||
double & | val4 | ||
) |
NO SCRIPT SUPPORT.
Gets the stored value of this data object as a quadruple of doubles.
The data object must have been created as a quadruple of doubles for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
[out] | val4 | storage for the fourth element |
MStatus setData | ( | short | val1, |
short | val2 | ||
) |
NO SCRIPT SUPPORT.
Sets the stored value of this data object as a pair of short integers.
The data object must have been created as a pair of short integers for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
MStatus setData | ( | int | val1, |
int | val2 | ||
) |
NO SCRIPT SUPPORT.
Sets the stored value of this data object as a pair of int integers.
The data object must have been created as a pair of int integers for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
MStatus setData | ( | float | val1, |
float | val2 | ||
) |
NO SCRIPT SUPPORT.
Sets the stored value of this data object as a pair of floats.
The data object must have been created as a pair of floats for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
MStatus setData | ( | double | val1, |
double | val2 | ||
) |
NO SCRIPT SUPPORT.
Sets the stored value of this data object as a pair of doubles.
The data object must have been created as a pair of doubles for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
MStatus setData | ( | short | val1, |
short | val2, | ||
short | val3 | ||
) |
NO SCRIPT SUPPORT.
Sets the stored value of this data object as a triple of short integers.
The data object must have been created as a triple of short integers for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
MStatus setData | ( | int | val1, |
int | val2, | ||
int | val3 | ||
) |
NO SCRIPT SUPPORT.
Sets the stored value of this data object as a triple of int integers.
The data object must have been created as a triple of int integers for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
MStatus setData | ( | float | val1, |
float | val2, | ||
float | val3 | ||
) |
NO SCRIPT SUPPORT.
Sets the stored value of this data object as a triple of floats.
The data object must have been created as a triple of floats for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
MStatus setData | ( | double | val1, |
double | val2, | ||
double | val3 | ||
) |
NO SCRIPT SUPPORT.
Sets the stored value of this data object as a triple of doubles.
The data object must have been created as a triple of doubles for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
MStatus setData | ( | double | val1, |
double | val2, | ||
double | val3, | ||
double | val4 | ||
) |
NO SCRIPT SUPPORT.
Sets the stored value of this data object as a quadruple of doubles.
The data object must have been created as a quadruple of doubles for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
[in] | val4 | the fourth element |
MStatus getData2Short | ( | short & | val1, |
short & | val2 | ||
) |
Gets the stored value of this data object as a pair of short integers.
The data object must have been created as a pair of short integers for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
MStatus getData2Int | ( | int & | val1, |
int & | val2 | ||
) |
Gets the stored value of this data object as a pair of int integers.
The data object must have been created as a pair of int integers for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
MStatus getData2Float | ( | float & | val1, |
float & | val2 | ||
) |
Gets the stored value of this data object as a pair of floats.
The data object must have been created as a pair of floats for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
MStatus getData2Double | ( | double & | val1, |
double & | val2 | ||
) |
Gets the stored value of this data object as a pair of doubles.
The data object must have been created as a pair of doubles for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
MStatus getData3Short | ( | short & | val1, |
short & | val2, | ||
short & | val3 | ||
) |
Gets the stored value of this data object as a triple of short integers.
The data object must have been created as a pair of short integers for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
MStatus getData3Int | ( | int & | val1, |
int & | val2, | ||
int & | val3 | ||
) |
Gets the stored value of this data object as a triple of int integers.
The data object must have been created as a triple of int integers for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
MStatus getData3Float | ( | float & | val1, |
float & | val2, | ||
float & | val3 | ||
) |
Gets the stored value of this data object as a triple of floats.
The data object must have been created as a triple of floats for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
MStatus getData3Double | ( | double & | val1, |
double & | val2, | ||
double & | val3 | ||
) |
Gets the stored value of this data object as a triple of doubles.
The data object must have been created as a triple of doubles for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
MStatus getData4Double | ( | double & | val1, |
double & | val2, | ||
double & | val3, | ||
double & | val4 | ||
) |
Gets the stored value of this data object as a quadruple of doubles.
The data object must have been created as a quadruple of doubles for this to succeed.
[out] | val1 | storage for the first element |
[out] | val2 | storage for the second element |
[out] | val3 | storage for the third element |
[out] | val4 | storage for the fourth element |
MStatus setData2Short | ( | short | val1, |
short | val2 | ||
) |
Sets the stored value of this data object as a pair of short integers.
The data object must have been created as a pair of short integers for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
MStatus setData2Int | ( | int | val1, |
int | val2 | ||
) |
Sets the stored value of this data object as a pair of int integers.
The data object must have been created as a pair of int integers for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
MStatus setData2Float | ( | float | val1, |
float | val2 | ||
) |
Sets the stored value of this data object as a pair of floats.
The data object must have been created as a pair of floats for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
MStatus setData2Double | ( | double | val1, |
double | val2 | ||
) |
Sets the stored value of this data object as a pair of doubles.
The data object must have been created as a pair of doubles for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
MStatus setData3Short | ( | short | val1, |
short | val2, | ||
short | val3 | ||
) |
Sets the stored value of this data object as a triple of short integers.
The data object must have been created as a triple of short integers for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
MStatus setData3Int | ( | int | val1, |
int | val2, | ||
int | val3 | ||
) |
Sets the stored value of this data object as a triple of int integers.
The data object must have been created as a triple of int integers for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
MStatus setData3Float | ( | float | val1, |
float | val2, | ||
float | val3 | ||
) |
Sets the stored value of this data object as a triple of floats.
The data object must have been created as a triple of floats for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
MStatus setData3Double | ( | double | val1, |
double | val2, | ||
double | val3 | ||
) |
Sets the stored value of this data object as a triple of doubles.
The data object must have been created as a triple of doubles for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
MStatus setData4Double | ( | double | val1, |
double | val2, | ||
double | val3, | ||
double | val4 | ||
) |
Sets the stored value of this data object as a quadruple of doubles.
The data object must have been created as a quadruple of doubles for this to succeed.
[in] | val1 | the first element |
[in] | val2 | the second element |
[in] | val3 | the third element |
[in] | val4 | the fourth element |