C++ API Reference

Numeric data function set. More...

#include <MFnNumericData.h>

+ Inheritance diagram for MFnNumericData:

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, kFalloffFunction
}
 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=nullptr) 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...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 
- Static Public Member Functions inherited from MFnData
static const char * className ()
 Returns the name of this class. More...
 
- Static Public Member Functions inherited from MFnBase
static const char * className ()
 Returns the name of this class. More...
 
static const char * typeString (MFn::Type)
 Returns the type string for a given type. More...
 
static bool isValid (MFn::Type)
 Returns true if type is in the range of valid types. More...
 

Detailed Description

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.

Examples:
AbcBullet/AttributesWriter.cpp, AbcExport/AttributesWriter.cpp, AbcImport/NodeIteratorVisitorHelper.cpp, apiMeshShape/apiMeshShape.cpp, cgFx/cgfxAttrDef.cpp, componentScaleManip/componentScaleManip.cpp, footPrintManip/footPrintManip.cpp, genericAttributeNode/genericAttributeNode.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.cpp, gpuCache/gpuCacheMaterialBakers.cpp, meshOpCmd/polyModifierCmd.cpp, renderAccessNode/renderAccessNode.cpp, rotateManip/rotateManip.cpp, splitUVCmd/polyModifierCmd.cpp, surfaceBumpManip/surfaceBumpManip.cpp, swissArmyManip/swissArmyManip.cpp, transformDrawNode/transformDrawNode.cpp, and uiDrawManager/uiDrawManager.cpp.

Member Enumeration Documentation

enum Type

Supported numerical types.

Enumerator
kInvalid 

Invalid data.

kBoolean 

Boolean.

kByte 

One byte.

kChar 

One character.

kShort 

One short.

k2Short 

Two shorts.

k3Short 

Three shorts.

kLong 

One long.

Same as int since "long" is not platform-consistent.

kInt 

One int.

k2Long 

Two longs.

Same as 2 ints since "long" is not platform-consistent.

k2Int 

Two ints.

k3Long 

Three longs.

Same as 3 ints since "long" is not platform-consistent.

k3Int 

Three ints.

kInt64 

One 64-bit int.

kFloat 

One float.

k2Float 

Two floats.

k3Float 

Three floats.

kDouble 

One double.

k2Double 

Two doubles.

k3Double 

Three doubles.

k4Double 

Four doubles.

kAddr 

An address.

kLast 

Last value.

Does not represent a real type, but can be used to loop on all possible types.

Constructor & Destructor Documentation

MFnNumericData ( MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters
[in]objectThe MObject to attach the function set to
[out]ReturnStatusthe return status
Status Codes:
  • MS::kSuccess if the function set is successfully attached
  • MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject
MFnNumericData ( const MObject object,
MStatus ReturnStatus = NULL 
)

NO SCRIPT SUPPORT.

Class constructor that initializes the function set to the given MObject.

Constructor

Parameters
[in]objectThe MObject to attach the function set to
[out]ReturnStatusthe return status
Status Codes:
  • MS::kSuccess if the function set is successfully attached
  • MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

Member Function Documentation

MFn::Type type ( ) const
virtual

Function set type.

Return the class type : MFn::kNumericData.

Returns
the class type.

Reimplemented from MFnData.

OPENMAYA_MAJOR_NAMESPACE_OPEN const char * className ( )
static

Returns the name of this class.

Return the class name : "MFnNumericData".

Returns
Name of this class.
MObject create ( Type  dataType,
MStatus ReturnStatus = NULL 
)

Creates a new data object of the given type.

Only pair and triples of numeric data may be created (eg k3Float).

Parameters
[in]dataTypedata type of object to create
[out]ReturnStatusreturn status
Returns
A pointer to the new object
Status Codes:
  • kSuccess operation successful
  • kInvalidParameter cannot create an object of the given type
  • kInsufficientMemory out of memory
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp, cgFx/cgfxAttrDef.cpp, componentScaleManip/componentScaleManip.cpp, footPrintManip/footPrintManip.cpp, genericAttributeNode/genericAttributeNode.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.cpp, meshOpCmd/polyModifierCmd.cpp, rotateManip/rotateManip.cpp, splitUVCmd/polyModifierCmd.cpp, surfaceBumpManip/surfaceBumpManip.cpp, and swissArmyManip/swissArmyManip.cpp.
MFnNumericData::Type numericType ( MStatus ReturnStatus = NULL)

Returns the type of the numeric data object.

Parameters
[out]ReturnStatusreturn status
Returns
Type of data
Status Codes:
  • kSuccess operation successful
  • kFailure function set has no object
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of short integers, or function set has no object
Examples:
apiMeshShape/apiMeshShape.cpp, meshOpCmd/polyModifierCmd.cpp, and splitUVCmd/polyModifierCmd.cpp.
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of int integers, or function set has no object
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of floats, or function set has no object
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of doubles, or function set has no object
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of short integers, or function set has no object
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of int integers, or function set has no object
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of floats, or function set has no object
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
[out]val4storage for the fourth element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a quadruple of doubles, or function set has no object
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.

Parameters
[in]val1the first element
[in]val2the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of short integers, or function set has no object
Examples:
cgFx/cgfxAttrDef.cpp, componentScaleManip/componentScaleManip.cpp, footPrintManip/footPrintManip.cpp, genericAttributeNode/genericAttributeNode.cpp, meshOpCmd/polyModifierCmd.cpp, rotateManip/rotateManip.cpp, splitUVCmd/polyModifierCmd.cpp, surfaceBumpManip/surfaceBumpManip.cpp, and swissArmyManip/swissArmyManip.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of int integers, or function set has no object
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.

Parameters
[in]val1the first element
[in]val2the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of floats, or function set has no object
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.

Parameters
[in]val1the first element
[in]val2the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kDataIsNotOfThatType data is not a pair of doubles
  • kObjectDoesNotExist function set has no object
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of doubles, or function set has no object
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of int integers, or function set has no object
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of floats, or function set has no object
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
[in]val4the fourth element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of short integers, or function set has no object
Examples:
AbcBullet/AttributesWriter.cpp, and AbcExport/AttributesWriter.cpp.
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of int integers, or function set has no object
Examples:
AbcBullet/AttributesWriter.cpp, and AbcExport/AttributesWriter.cpp.
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of floats, or function set has no object
Examples:
AbcBullet/AttributesWriter.cpp, AbcExport/AttributesWriter.cpp, and gpuCache/gpuCacheMaterialBakers.cpp.
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of doubles, or function set has no object
Examples:
AbcBullet/AttributesWriter.cpp, and AbcExport/AttributesWriter.cpp.
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of short integers, or function set has no object
Examples:
AbcBullet/AttributesWriter.cpp, and AbcExport/AttributesWriter.cpp.
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of int integers, or function set has no object
Examples:
AbcBullet/AttributesWriter.cpp, and AbcExport/AttributesWriter.cpp.
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of floats, or function set has no object
Examples:
AbcBullet/AttributesWriter.cpp, AbcExport/AttributesWriter.cpp, and gpuCache/gpuCacheMaterialBakers.cpp.
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object
Examples:
AbcBullet/AttributesWriter.cpp, and AbcExport/AttributesWriter.cpp.
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.

Parameters
[out]val1storage for the first element
[out]val2storage for the second element
[out]val3storage for the third element
[out]val4storage for the fourth element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a quadruple of doubles, or function set has no object
Examples:
AbcBullet/AttributesWriter.cpp, and AbcExport/AttributesWriter.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of short integers, or function set has no object
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of int integers, or function set has no object
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of floats, or function set has no object
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kDataIsNotOfThatType data is not a pair of doubles
  • kObjectDoesNotExist function set has no object
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a pair of doubles, or function set has no object
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of int integers, or function set has no object
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of floats, or function set has no object
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp, and geometrySurfaceConstraint/geometrySurfaceConstraint.cpp.
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.

Parameters
[in]val1the first element
[in]val2the second element
[in]val3the third element
[in]val4the fourth element
Returns
Return status
Status Codes:
  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp.

The documentation for this class was generated from the following files: