MFnNumericData

Base Class

MFnData

Constants

NameTypeDescription
Numeric Types
kInvalidintInvalid data.
kBooleanintBoolean.
kByteintOne byte.
kCharintOne character.
kShortintOne short.
k2ShortintTwo shorts.
k3ShortintThree shorts.
kLongintOne int.
kInt = kLongintSame as kLong.
k2LongintTwo ints.
k2Int = k2LongintSame as k2Long.
k3LongintThree ints.
k3Int = k3LongintSame as k3Long.
kFloatintOne float.
k2FloatintTwo floats.
k3FloatintThree floats.
kDoubleintOne double.
k2DoubleintTwo doubles.
k3DoubleintThree doubles.
k4DoubleintFour doubles.
kAddrintAn address/pointer.
kLastintLast value. Used for counting.

Static Methods

None.

Static Attributes

None.

Constructors

SignatureParametersDescription
MFnNumericData()   Default constructor. Returns a new MFnNumericData function set with no Maya object attached.
MFnNumericData(object) object - MObject Returns a new MFnNumericData function set, with the specified Maya object attached.

Object Methods

SignatureParametersReturnsDescription
create(type) type - Numeric Type constant MObject Creates a new numeric data object of the given type, attaches it to the function set and returns an MObject which references it. Only the multi-value numeric types (e.g. k2Short, k3Short) are accepted. Single-value numeric types (e.g. kShort) can be accessed directly through MPlug and MDataHandle and thus do not require a data object to encapsulate them.
getData()   list Returns a list containing the encapsulated numeric data's elements. k*Short, k*Int and k*Long types will be returned as Python integers. k*Float and k*Double types will be returned as Python floats.
numericType()   Numeric Type constant Returns the type of numeric data in the object currently attached to the function set.
setData(seq) seq - sequence of data values Reference to self. Replaces the encapsulated data with the elements of the supplied sequence. k*Short, k*Int and k*Long types will accept sequences of Python integers. k*Float and k*Double types will accept sequences of Python floats, integers or a mix of the two. If the sequence contains the wrong number or type of elements then a TypeError will be raised.

Object Attributes

None.

Sequence Support

None.

Number Support

None.

Comparison Support

None.

© 2011 Autodesk, Inc. All rights reserved.