MFnNumericAttribute

Base Class

MFnAttribute

Constants

None.

Static Methods

None.

Static Attributes

None.

Constructors

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

Object Methods

SignatureParametersReturnsDescription
child(index) index - int MObject Returns the specified child attribute of the parent attribute currently attached to the function set.
create(longName, shortName, type, defaultValue=0) longName - string
shortName - string
type - MFnNumericData Type constant
defaultValue - float
MObject Creates a new numeric attribute of the given type with the given longName, shortName and defaultValue, attaches it to the function set and returns it in an MObject.
create(longName, shortName, child1, child2, child3=MObject.kNullObj) longName - string
shortName - string
child1 - MObject
child2 - MObject
child3 - MObject
MObject Convenience method. Creates a new compound attribute with the given longName and shortName, with two or three child numeric attributes, attaches it to the function set and returns it in an MObject.
createAddr(longName, shortName, defaultValue=0) longName - string
shortName - string
defaultValue - long
MObject Creates a new address attribute with the given longName, shortName and defaultValue, attaches it to the function set and returns it in an MObject.
createColor(longName, shortName) longName - string
shortName - string
MObject Creates a new color attribute with the given longName, shortName, attaches it to the function set and returns it in an MObject.
createPoint(longName, shortName) longName - string
shortName - string
MObject Creates a new 3D point attribute with the given longName, shortName, attaches it to the function set and returns it in an MObject.
getMax()   float or tuple of floats Returns a float representing the attribute's hard maximum value. If the attribute consists of multiple components (e.g. a k3Float attribute) then a tuple containing a separate maximum value for each component will be returned.Raises a RuntimeError if the attribute does not have a hard maximum.
getMin()   float or tuple of floats Returns a float representing the attribute's hard minimum value. If the attribute consists of multiple components (e.g. a k3Float attribute) then a tuple containing a separate minimum value for each component will be returned.Raises a RuntimeError if the attribute does not have a hard minimum.
getSoftMax()   float Returns the attribute's soft maximum value.Raises a RuntimeError if the attribute does not have a soft maximum.
getSoftMin()   float Returns the attribute's soft minimum value.Raises a RuntimeError if the attribute does not have a soft minimum.
hasMax()   bool Returns True if a hard maximum value has been specified for the attribute.
hasMin()   bool Returns True if a hard minimum value has been specified for the attribute.
hasSoftMax()   bool Returns True if a soft maximum value has been specified for the attribute.
hasSoftMin()   bool Returns True if a soft minimum value has been specified for the attribute.
numericType()   MFnNumericData Type constant Returns the numeric type of the attribute currently attached to the function set.
setMax(maxValue) maxValue - float or sequence of floats Reference to self. Sets the attribute's hard maximum to maxValue. If the attribute consists of multiple components (e.g. a k3Float or color attribute) then maxValue must be a sequence providing a maximum value for each component.
setMin(minValue) minValue - float or sequence of floats Reference to self. Sets the attribute's hard minimum to minValue. If the attribute consists of multiple components (e.g. a k3Float or color attribute) then minValue must be a sequence providing a minimum value for each component.
setSoftMax(maxValue) maxValue - float Reference to self. Sets the attribute's soft maximum to maxValue.
setSoftMin(minValue) minValue - float Reference to self. Sets the attribute's soft minimum to minValue.

Object Attributes

NameTypeAccessDescription
default value or tuple of values RW Default value of attribute. If the attribute consists of multiple components (e.g. a k3Float or color attribute) then the default value will be a tuple containing the default values for each component.

Sequence Support

None.

Number Support

None.

Comparison Support

None.

© 2011 Autodesk, Inc. All rights reserved.