# MFnNumericData

## Base Class

MFnData

## Constants

Name | Type | Description
--- | --- | ---
Numeric Types
kInvalid | int | Invalid data.
kBoolean | int | Boolean.
kByte | int | One byte.
kChar | int | One character.
kShort | int | One short.
k2Short | int | Two shorts.
k3Short | int | Three shorts.
kLong | int | One int.
kInt = kLong | int | Same as kLong.
k2Long | int | Two ints.
k2Int = k2Long | int | Same as k2Long.
k3Long | int | Three ints.
k3Int = k3Long | int | Same as k3Long.
kFloat | int | One float.
k2Float | int | Two floats.
k3Float | int | Three floats.
kDouble | int | One double.
k2Double | int | Two doubles.
k3Double | int | Three doubles.
k4Double | int | Four doubles.
kAddr | int | An address/pointer.
kLast | int | Last value. Used for counting.

## Static Methods

None.

## Static Attributes

None.

## Constructors

Signature | Parameters | Description
--- | --- | ---
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

Signature | Parameters | Returns | Description
--- | --- | --- | ---
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.