Functionset for creating and working with numeric attributes.
Method resolution order:
- MFnNumericAttribute
- MFnAttribute
- MFnBase
- __builtin__.object
Base Class
MFnAttribute<h2>Constructors
Signature
Parameters
Description
MFnNumericAttribute()
Default constructor. Returns a new MFnNumericAttribute function set with no Maya object attached.
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.
OpenMaya.MFnNumericAttribute.createAddr
(
)
Creates a new address attribute, attaches it to the function set and returns it in an MObject.
Signature:
createAddr(longName, shortName, defaultValue=0)
Parameters:
longName - string
shortName - string
defaultValue - long
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.
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.
Returns the numeric type of the attribute currently attached to the function set.
OpenMaya.MFnNumericAttribute.setMax
(
)
Sets the attribute's hard maximum value(s).
Signature:
setMax(maxValue)
Parameters:
maxValue - float or sequence of floats
Returns:
Reference to self.
Description:
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.
OpenMaya.MFnNumericAttribute.setMin
(
)
Sets the attribute's hard minimum value(s).
Signature:
setMin(minValue)
Parameters:
minValue - float or sequence of floats
Returns:
Reference to self.
Description:
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.
OpenMaya.MFnNumericAttribute.setSoftMax
(
)
Sets the attribute's soft maximum value.
Signature:
setSoftMax(maxValue)
Parameters:
maxValue - float
Returns:
Reference to self.
Description:
Sets the attribute's soft maximum to maxValue.
OpenMaya.MFnNumericAttribute.setSoftMin
(
)
Sets the attribute's soft minimum value.
Signature:
setSoftMin(minValue)
Parameters:
minValue - float
Returns:
Reference to self.
Description:
Sets the attribute's soft minimum to minValue.
Property Documentation
OpenMaya.MFnNumericAttribute.default
static
Default value
Name:
default
Type:
value or tuple of values
Access:
RW
Description:
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.