Python API 2.0 Reference: OpenMaya.MFnNumericAttribute Class Reference

+ Inheritance diagram for OpenMaya.MFnNumericAttribute:

Public Member Functions

__init__ ()
 
child ()
 
create ()
 
createAddr ()
 
createColor ()
 
createPoint ()
 
getMax ()
 
getMin ()
 
getSoftMax ()
 
getSoftMin ()
 
hasMax ()
 
hasMin ()
 
hasSoftMax ()
 
hasSoftMin ()
 
numericType ()
 
setMax ()
 
setMin ()
 
setSoftMax ()
 
setSoftMin ()
 
- Public Member Functions inherited from OpenMaya.MFnAttribute
__init__ ()
 
accepts ()
 
acceptsAttribute ()
 
addToCategory ()
 
getAddAttrCmd ()
 
hasCategory ()
 
setNiceNameOverride ()
 
- Public Member Functions inherited from OpenMaya.MFnBase
__init__ ()
 
hasObj ()
 
object ()
 
setObject ()
 
type ()
 

Properties

 default
 
- Properties inherited from OpenMaya.MFnAttribute
 affectsAppearance
 
 affectsWorldSpace
 
 array
 
 cached
 
 channelBox
 
 connectable
 
 disconnectBehavior
 
 dynamic
 
 extension
 
 hidden
 
 indeterminant
 
 indexMatters
 
 internal
 
 isProxyAttribute
 
 keyable
 
 name
 
 parent
 
 readable
 
 renderSource
 
 shortName
 
 storable
 
 usedAsColor
 
 usedAsFilename
 
 usesArrayDataBuilder
 
 worldSpace
 
 writable
 

Additional Inherited Members

- Static Public Attributes inherited from OpenMaya.MFnAttribute
int kDelete = 0
 
int kNothing = 2
 
int kReset = 1
 

Detailed Description

Functionset for creating and working with numeric attributes.

Method resolution order:
-   MFnNumericAttribute
-   MFnAttribute
-   MFnBase
-   __builtin__.object

Base Class

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

 


Constructor & Destructor Documentation

OpenMaya.MFnNumericAttribute.__init__ ( )
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Member Function Documentation

OpenMaya.MFnNumericAttribute.child ( )
Returns the specified child attribute of the parent attribute currently attached to the function set.
Signature: child(index)
Parameters: index - int
Returns: MObject
Description: Returns the specified child attribute of the parent attribute currently attached to the function set.
OpenMaya.MFnNumericAttribute.create ( )
Creates a new simple or compound numeric attribute, attaches it to the function set and returns it in an MObject.
Signature: create(longName, shortName, type, defaultValue=0)
Parameters: longName - string
shortName - string
type - MFnNumericData Type constant
defaultValue - float
Returns: MObject
Description: 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: MObject
Description: Creates a new address attribute with the given longName, shortName and defaultValue, attaches it to the function set and returns it in an MObject.
OpenMaya.MFnNumericAttribute.createColor ( )
Creates a new color attribute, attaches it to the function set and returns it in an MObject.
Signature: createColor(longName, shortName)
Parameters: longName - string
shortName - string
Returns: MObject
Description: Creates a new color attribute with the given longName, shortName, attaches it to the function set and returns it in an MObject.
OpenMaya.MFnNumericAttribute.createPoint ( )
Creates a new 3D point attribute, attaches it to the function set and returns it in an MObject.
Signature: createPoint(longName, shortName)
Parameters: longName - string
shortName - string
Returns: MObject
Description: Creates a new 3D point attribute with the given longName, shortName, attaches it to the function set and returns it in an MObject.
OpenMaya.MFnNumericAttribute.getMax ( )
Returns the attribute's hard maximum value(s).
Signature: getMax()
Parameters:  
Returns: float or tuple of floats
Description: 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.
OpenMaya.MFnNumericAttribute.getMin ( )
Returns the attribute's hard minimum value(s).
Signature: getMin()
Parameters:  
Returns: float or tuple of floats
Description: 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.
OpenMaya.MFnNumericAttribute.getSoftMax ( )
Returns the attribute's soft maximum value.
Signature: getSoftMax()
Parameters:  
Returns: float
Description: Returns the attribute's soft maximum value.Raises a RuntimeError if the attribute does not have a soft maximum.
OpenMaya.MFnNumericAttribute.getSoftMin ( )
Returns the attribute's soft minimum value.
Signature: getSoftMin()
Parameters:  
Returns: float
Description: Returns the attribute's soft minimum value.Raises a RuntimeError if the attribute does not have a soft minimum.
OpenMaya.MFnNumericAttribute.hasMax ( )
Returns True if a hard maximum value has been specified for the attribute.
Signature: hasMax()
Parameters:  
Returns: bool
Description: Returns True if a hard maximum value has been specified for the attribute.
OpenMaya.MFnNumericAttribute.hasMin ( )
Returns True if a hard minimum value has been specified for the attribute.
Signature: hasMin()
Parameters:  
Returns: bool
Description: Returns True if a hard minimum value has been specified for the attribute.
OpenMaya.MFnNumericAttribute.hasSoftMax ( )
Returns True if a soft maximum value has been specified for the attribute.
Signature: hasSoftMax()
Parameters:  
Returns: bool
Description: Returns True if a soft maximum value has been specified for the attribute.
OpenMaya.MFnNumericAttribute.hasSoftMin ( )
Returns True if a soft minimum value has been specified for the attribute.
Signature: hasSoftMin()
Parameters:  
Returns: bool
Description: Returns True if a soft minimum value has been specified for the attribute.
OpenMaya.MFnNumericAttribute.numericType ( )
Returns the numeric type of the attribute currently attached to the function set.
Signature: numericType()
Parameters:  
Returns: MFnNumericData Type constant
Description: 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.