Python API 2.0 Reference
OpenMaya.MFnNumericData Class Reference
+ Inheritance diagram for OpenMaya.MFnNumericData:

Public Member Functions

def __init__ ()
 
def create ()
 
def getData ()
 
def numericType ()
 
def setData ()
 
- Public Member Functions inherited from OpenMaya.MFnData
def __init__ ()
 
- Public Member Functions inherited from OpenMaya.MFnBase
def __init__ ()
 
def hasObj ()
 
def object ()
 
def setObject ()
 
def type ()
 

Static Public Member Functions

def __new__ ()
 
- Static Public Member Functions inherited from OpenMaya.MFnData
def __new__ ()
 
- Static Public Member Functions inherited from OpenMaya.MFnBase
def __new__ ()
 

Static Public Attributes

int kInt64 = 10
 
Numeric Types
int k2Double = 15
 
int k2Float = 12
 
int k2Int = 8
 
int k2Long = 8
 
int k2Short = 5
 
int k3Double = 16
 
int k3Float = 13
 
int k3Int = 9
 
int k3Long = 9
 
int k3Short = 6
 
int k4Double = 17
 
int kAddr = 18
 
int kBoolean = 1
 
int kByte = 2
 
int kChar = 3
 
int kDouble = 14
 
int kFloat = 11
 
int kInt = 7
 
int kInvalid = 0
 
int kLast = 19
 
int kLong = 7
 
int kShort = 4
 
- Static Public Attributes inherited from OpenMaya.MFnData
int kAny = 24
 
int kFalloffFunction = 25
 
int kFloatArray = 8
 
int kMatrixArray = 12
 
int kComponentList = 13
 
int kDoubleArray = 7
 
int kDynArrayAttrs = 19
 
int kDynSweptGeometry = 20
 
int kIntArray = 9
 
int kInvalid = 0
 
int kLast = 26
 
int kLattice = 15
 
int kMatrix = 5
 
int kMesh = 14
 
int kNId = 23
 
int kNObject = 22
 
int kNumeric = 1
 
int kNurbsCurve = 16
 
int kNurbsSurface = 17
 
int kPlugin = 2
 
int kPluginGeometry = 3
 
int kPointArray = 10
 
int kSphere = 18
 
int kString = 4
 
int kStringArray = 6
 
int kSubdSurface = 21
 
int kVectorArray = 11
 

Detailed Description

Function set for non-simple numeric node data.

Method resolution order:
-   MFnNumericData
-   MFnData
-   MFnBase
-   builtins.object

Base Class

MFnData<h2>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.

 


Constructor & Destructor Documentation

def OpenMaya.MFnNumericData.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMaya.MFnNumericData.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
OpenMaya.MFnNumericData.create ( )
Creates a new numeric data object.
Signature: create(type)
Parameters: type - Numeric Type constant
Returns: MObject
Description: 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.
OpenMaya.MFnNumericData.getData ( )
Returns a list containing the attached data object's data.
Signature: getData()
Parameters:  
Returns: list
Description: 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.
OpenMaya.MFnNumericData.numericType ( )
Returns the type of data in the attached data object.
Signature: numericType()
Parameters:  
Returns: Numeric Type constant
Description: Returns the type of numeric data in the object currently attached to the function set.
OpenMaya.MFnNumericData.setData ( )
Sets the value of the data in the attached data object.
Signature: setData(seq)
Parameters: seq - sequence of data values
Returns: Reference to self.
Description: 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.

Member Data Documentation

OpenMaya.MFnNumericData.k2Double = 15
static
Name: k2Double
Type: int
Description: Two doubles.
OpenMaya.MFnNumericData.k2Float = 12
static
Name: k2Float
Type: int
Description: Two floats.
OpenMaya.MFnNumericData.k2Int = 8
static
Name: k2Int = k2Long
Type: int
Description: Same as k2Long.
OpenMaya.MFnNumericData.k2Long = 8
static
Name: k2Long
Type: int
Description: Two ints.
OpenMaya.MFnNumericData.k2Short = 5
static
Name: k2Short
Type: int
Description: Two shorts.
OpenMaya.MFnNumericData.k3Double = 16
static
Name: k3Double
Type: int
Description: Three doubles.
OpenMaya.MFnNumericData.k3Float = 13
static
Name: k3Float
Type: int
Description: Three floats.
OpenMaya.MFnNumericData.k3Int = 9
static
Name: k3Int = k3Long
Type: int
Description: Same as k3Long.
OpenMaya.MFnNumericData.k3Long = 9
static
Name: k3Long
Type: int
Description: Three ints.
OpenMaya.MFnNumericData.k3Short = 6
static
Name: k3Short
Type: int
Description: Three shorts.
OpenMaya.MFnNumericData.k4Double = 17
static
Name: k4Double
Type: int
Description: Four doubles.
OpenMaya.MFnNumericData.kAddr = 18
static
Name: kAddr
Type: int
Description: An address/pointer.
OpenMaya.MFnNumericData.kBoolean = 1
static
Name: kBoolean
Type: int
Description: Boolean.
OpenMaya.MFnNumericData.kByte = 2
static
Name: kByte
Type: int
Description: One byte.
OpenMaya.MFnNumericData.kChar = 3
static
Name: kChar
Type: int
Description: One character.
OpenMaya.MFnNumericData.kDouble = 14
static
Name: kDouble
Type: int
Description: One double.
OpenMaya.MFnNumericData.kFloat = 11
static
Name: kFloat
Type: int
Description: One float.
OpenMaya.MFnNumericData.kInt = 7
static
Name: kInt = kLong
Type: int
Description: Same as kLong.
OpenMaya.MFnNumericData.kInvalid = 0
static
Name: kInvalid
Type: int
Description: Invalid data.
OpenMaya.MFnNumericData.kLast = 19
static
Name: kLast
Type: int
Description: Last value. Used for counting.
OpenMaya.MFnNumericData.kLong = 7
static
Name: kLong
Type: int
Description: One int.
OpenMaya.MFnNumericData.kShort = 4
static
Name: kShort
Type: int
Description: One short.