class MFnNumericData

Jump to documentation

: public MFnData Numeric data function set. (OpenMaya) (OpenMaya.py)

Inheritance:

MFnNumericData < MFnData < MFnBase

public members:

MFnNumericData ()
MFnNumericData ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnNumericData ()
virtual MFn::Type type () const
enum Type
kInvalid
kBoolean
Boolean
kByte
One byte
kChar
One character
kShort
One short
k2Short
Two shorts
k3Short
Three shorts
kLong
One long (actually int since "long" is not platform-consistent)
kInt
One int
k2Long
Two longs (actually 2 ints since "long" is not platform-consistent)
k2Int
Two ints
k3Long
Three longs (actually 3 ints since "long" is not platform-consistent)
k3Int
Three ints
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
MObject create ( Type dataType, MStatus * ReturnStatus = NULL )
Type numericType ( MStatus * ReturnStatus = NULL )
MStatus getData ( short& val1, short& val2 )
NO SCRIPT SUPPORT
MStatus getData ( int& val1, int& val2 )
NO SCRIPT SUPPORT
MStatus getData ( float& val1, float& val2 )
NO SCRIPT SUPPORT
MStatus getData ( double& val1, double& val2 )
NO SCRIPT SUPPORT
MStatus getData ( short& val1, short& val2, short& val3 )
NO SCRIPT SUPPORT
MStatus getData ( int& val1, int& val2, int& val3 )
NO SCRIPT SUPPORT
MStatus getData ( float& val1, float& val2, float& val3 )
NO SCRIPT SUPPORT
MStatus getData ( double& val1, double& val2, double& val3 )
NO SCRIPT SUPPORT
MStatus getData ( double& val1, double& val2, double& val3, double& val4 )
NO SCRIPT SUPPORT
MStatus setData ( short val1, short val2 )
NO SCRIPT SUPPORT
MStatus setData ( int val1, int val2 )
NO SCRIPT SUPPORT
MStatus setData ( float val1, float val2 )
NO SCRIPT SUPPORT
MStatus setData ( double val1, double val2 )
NO SCRIPT SUPPORT
MStatus setData ( short val1, short val2, short val3 )
NO SCRIPT SUPPORT
MStatus setData ( int val1, int val2, int val3 )
NO SCRIPT SUPPORT
MStatus setData ( float val1, float val2, float val3 )
NO SCRIPT SUPPORT
MStatus setData ( double val1, double val2, double val3 )
NO SCRIPT SUPPORT
MStatus setData ( double val1, double val2, double val3, double val4 )
NO SCRIPT SUPPORT
public
NO SCRIPT SUPPORT
MFnNumericData ( const MObject & object, MStatus * ReturnStatus = NULL )
MStatus getData2Short ( short& val1, short& val2 )
MStatus getData2Int ( int& val1, int& val2 )
MStatus getData2Float ( float& val1, float& val2 )
MStatus getData2Double ( double& val1, double& val2 )
MStatus getData3Short ( short& val1, short& val2, short& val3 )
MStatus getData3Int ( int& val1, int& val2, int& val3 )
MStatus getData3Float ( float& val1, float& val2, float& val3 )
MStatus getData3Double ( double& val1, double& val2, double& val3 )
MStatus getData4Double ( double& val1, double& val2, double& val3, double& val4 )
MStatus setData2Short ( short val1, short val2 )
MStatus setData2Int ( int val1, int val2 )
MStatus setData2Float ( float val1, float val2 )
MStatus setData2Double ( double val1, double val2 )
MStatus setData3Short ( short val1, short val2, short val3 )
MStatus setData3Int ( int val1, int val2, int val3 )
MStatus setData3Float ( float val1, float val2, float val3 )
MStatus setData3Double ( double val1, double val2, double val3 )
MStatus setData4Double ( double val1, double val2, double val3, double val4 )

Inherited from MFnData:

public members:

enum Type
kInvalid
kNumeric
Numeric, use MFnNumericData extract the node data.
kPlugin
Plugin Blind Data, use MFnPluginData to extract the node data.
kPluginGeometry
Plugin Geometry, use MFnGeometryData to extract the node data.
kString
String, use MFnStringData to extract the node data.
kMatrix
Matrix, use MFnMatrixData to extract the node data.
kStringArray
String Array, use MFnStringArrayData to extract the node data.
kDoubleArray
Double Array, use MFnDoubleArrayData to extract the node data.
kIntArray
Int Array, use MFnIntArrayData to extract the node data.
kPointArray
Point Array, use MFnPointArrayData to extract the node data.
kVectorArray
Vector Array, use MFnVectorArrayData to extract the node data.
kComponentList
Component List, use MFnComponentListData to extract the node data.
kMesh
Mesh, use MFnMeshData to extract the node data.
kLattice
Lattice, use MFnLatticeData to extract the node data.
kNurbsCurve
Nurbs Curve, use MFnNurbsCurveData to extract the node data.
kNurbsSurface
Nurbs Surface, use MFnNurbsSurfaceData to extract the node data.
kSphere
Sphere, use MFnSphereData to extract the node data.
kDynArrayAttrs
ArrayAttrs, use MFnArrayAttrsData to extract the node data.
kDynSweptGeometry
SweptGeometry, use MFnDynSweptGeometryData to extract the node data.
kSubdSurface
Subdivision Surface, use MFnSubdData to extract the node data.
kNObject
nObject data, use MFnNObjectData to extract node data
kLast

Inherited from MFnBase:

public members:

virtual MFn::Type type () const
bool hasObj ( MFn::Type ) const
bool hasObj ( const MObject & ) const
MObject object ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( MObject & object )
virtual MStatus setObject ( const MObject & object )

Documentation

MFnNumericData allows the manipulation of numeric data for dependency node attributes.
Description

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 pairs and triples of numeric data.

Functions

MFnNumericData:: MFnNumericData ()

Description

Default class constructor. The function set is not attached to an MObject.

MFnNumericData:: MFnNumericData ( MObject & object, MStatus * ReturnStatus )

Description

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

Arguments

  • object the MObject to attach the function set to
  • ReturnStatus the return status
    • 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:: MFnNumericData ( const MObject & object, MStatus * ReturnStatus )

Description

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

Arguments

  • object the const MObject to attach the function set to
  • ReturnStatus the return status
    • 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:: ~MFnNumericData ()

Description

The class destructor.

MFn::Type MFnNumericData:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kNumericData

MObject MFnNumericData:: create ( Type dataType, MStatus * ReturnStatus )

Description

Creates a new data object of the given type. Only pair and triples of numeric data may be created (eg k3Float).

Arguments

  • dataType data type of object to create
  • ReturnStatus return status

Return Value

  • a pointer to the new object

Status Codes

  • kSuccess operation successful
  • kInvalidParameter cannot create an object of the given type
  • kInsufficientMemory out of memory

MFnNumericData::Type MFnNumericData:: numericType ( MStatus * ReturnStatus )

Description

Returns the type of the numeric data object.

Arguments

  • val1 return status

Return Value

  • type of data

Status Codes

  • kSuccess operation successful
  • kFailure function set has no object

MStatus MFnNumericData:: getData ( short& val1, short& val2 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of short integers, or function set has no object

MStatus MFnNumericData:: getData ( int& val1, int& val2 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of int integers, or function set has no object

MStatus MFnNumericData:: getData ( float& val1, float& val2 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of floats, or function set has no object

MStatus MFnNumericData:: getData ( double& val1, double& val2 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of doubles, or function set has no object

MStatus MFnNumericData:: getData ( short& val1, short& val2, short& val3 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of short integers, or function set has no object

MStatus MFnNumericData:: getData ( int& val1, int& val2, int& val3 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of int integers, or function set has no object

MStatus MFnNumericData:: getData ( float& val1, float& val2, float& val3 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of floats, or function set has no object

MStatus MFnNumericData:: getData ( double& val1, double& val2, double& val3 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object

MStatus MFnNumericData:: getData ( double& val1, double& val2, double& val3, double& val4 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element
  • val4 storage for the fourth element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a quadruple of doubles, or function set has no object

MStatus MFnNumericData:: setData ( short val1, short val2 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of short integers, or function set has no object

MStatus MFnNumericData:: setData ( int val1, int val2 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of int integers, or function set has no object

MStatus MFnNumericData:: setData ( float val1, float val2 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of floats, or function set has no object

MStatus MFnNumericData:: setData ( double val1, double val2 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kDataIsNotOfThatType data is not a pair of doubles
  • kObjectDoesNotExist function set has no object

MStatus MFnNumericData:: setData ( short val1, short val2, short val3 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of doubles, or function set has no object

MStatus MFnNumericData:: setData ( int val1, int val2, int val3 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of int integers, or function set has no object

MStatus MFnNumericData:: setData ( float val1, float val2, float val3 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of floats, or function set has no object

MStatus MFnNumericData:: setData ( double val1, double val2, double val3 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object

MStatus MFnNumericData:: setData ( double val1, double val2, double val3, double val4 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element
  • val4 the fourth element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object

MStatus MFnNumericData:: getData2Short ( short& val1, short& val2 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of short integers, or function set has no object

MStatus MFnNumericData:: getData2Int ( int& val1, int& val2 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of int integers, or function set has no object

MStatus MFnNumericData:: getData2Float ( float& val1, float& val2 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of floats, or function set has no object

MStatus MFnNumericData:: getData2Double ( double& val1, double& val2 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of doubles, or function set has no object

MStatus MFnNumericData:: getData3Short ( short& val1, short& val2, short& val3 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of short integers, or function set has no object

MStatus MFnNumericData:: getData3Int ( int& val1, int& val2, int& val3 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of int integers, or function set has no object

MStatus MFnNumericData:: getData3Float ( float& val1, float& val2, float& val3 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of floats, or function set has no object

MStatus MFnNumericData:: getData3Double ( double& val1, double& val2, double& val3 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object

MStatus MFnNumericData:: getData4Double ( double& val1, double& val2, double& val3, double& val4 )

Description

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.

Arguments

  • val1 storage for the first element
  • val2 storage for the second element
  • val3 storage for the third element
  • val4 storage for the fourth element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a quadruple of doubles, or function set has no object

MStatus MFnNumericData:: setData2Short ( short val1, short val2 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of short integers, or function set has no object

MStatus MFnNumericData:: setData2Int ( int val1, int val2 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of int integers, or function set has no object

MStatus MFnNumericData:: setData2Float ( float val1, float val2 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of floats, or function set has no object

MStatus MFnNumericData:: setData2Double ( double val1, double val2 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kDataIsNotOfThatType data is not a pair of doubles
  • kObjectDoesNotExist function set has no object

MStatus MFnNumericData:: setData3Short ( short val1, short val2, short val3 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a pair of doubles, or function set has no object

MStatus MFnNumericData:: setData3Int ( int val1, int val2, int val3 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of int integers, or function set has no object

MStatus MFnNumericData:: setData3Float ( float val1, float val2, float val3 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of floats, or function set has no object

MStatus MFnNumericData:: setData3Double ( double val1, double val2, double val3 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object

MStatus MFnNumericData:: setData4Double ( double val1, double val2, double val3, double val4 )

Description

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.

Arguments

  • val1 the first element
  • val2 the second element
  • val3 the third element
  • val4 the fourth element

Return Value

  • return status

Status Codes

  • kSuccess operation successful
  • kFailure data is not a triple of doubles, or function set has no object

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright