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

Public Member Functions

def __init__ ()
 
def create ()
 
def getMax ()
 
def getMin ()
 
def getSoftMax ()
 
def getSoftMin ()
 
def hasMax ()
 
def hasMin ()
 
def hasSoftMax ()
 
def hasSoftMin ()
 
def setMax ()
 
def setMin ()
 
def setSoftMax ()
 
def setSoftMin ()
 
def unitType ()
 
- Public Member Functions inherited from OpenMaya.MFnAttribute
def __init__ ()
 
def accepts ()
 
def acceptsAttribute ()
 
def addToCategory ()
 
def getAddAttrCmd ()
 
def hasCategory ()
 
def setNiceNameOverride ()
 
- 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.MFnAttribute
def __new__ ()
 
- Static Public Member Functions inherited from OpenMaya.MFnBase
def __new__ ()
 

Static Public Attributes

Unit Types
int kAngle = 1
 
int kDistance = 2
 
int kInvalid = 0
 
int kLast = 4
 
int kTime = 3
 
- Static Public Attributes inherited from OpenMaya.MFnAttribute
int kDelete = 0
 
int kNothing = 2
 
int kReset = 1
 

Properties

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

Detailed Description

Functionset for creating and working with angle, distance and time attributes.

Method resolution order:
-   MFnUnitAttribute
-   MFnAttribute
-   MFnBase
-   builtins.object

Base Class

MFnAttribute<h2>Constructors

SignatureParametersDescription
MFnUnitAttribute()  

Default constructor. Returns a new MFnUnitAttribute function set with no Maya object attached.

MFnUnitAttribute(object) object - MObject

Returns a new MFnUnitAttribute function set, attached to the specified Maya object.

 


Constructor & Destructor Documentation

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

Member Function Documentation

def OpenMaya.MFnUnitAttribute.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
OpenMaya.MFnUnitAttribute.create ( )
Creates a new unit attribute, attaches it to the function set and returns it as an MObject.
Signature: create(longName, shortName, type, defaultValue=0.0)
Parameters: longName - string
shortName - string
type - Unit Type constant
defaultValue - float
Returns: MObject
Description: Creates a new attribute of the given type with the given longName, shortName and defaultValue, attaches it to the function set and returns it in an MObject.
Signature: create(longName, shortName, defaultValue)
Parameters: longName - string
shortName - string
defaultValue - MAngle, MDistance or MTime
Returns: MObject
Description: Creates a new angle, distance or time attribute, depending upon the type of the defaultValue, with the given longName, shortName, attaches it to the function set and returns it in an MObject.
OpenMaya.MFnUnitAttribute.getMax ( )
Returns the attribute's hard maximum value. Returned MAngle and MDistance are always in radians and centimeters, respectively
Signature: getMax()
Parameters:  
Returns: MAngle, MDistance or MTime
Description: Returns the attribute's hard maximum value. Raises a RuntimeError if the attribute does not have a hard maximum.
OpenMaya.MFnUnitAttribute.getMin ( )
Returns the attribute's hard minimum value. Returned MAngle and MDistance are always in radians and centimeters, respectively
Signature: getMin()
Parameters:  
Returns: MAngle, MDistance or MTime
Description: Returns the attribute's hard minimum value. Raises a RuntimeError if the attribute does not have a hard minimum.
OpenMaya.MFnUnitAttribute.getSoftMax ( )
Returns the attribute's soft maximum value. Returned MAngle and MDistance are always in radians and centimeters, respectively
Signature: getSoftMax()
Parameters:  
Returns: MAngle, MDistance or MTime
Description: Returns the attribute's soft maximum value. Raises a RuntimeError if the attribute does not have a soft maximum.
OpenMaya.MFnUnitAttribute.getSoftMin ( )
Returns the attribute's soft minimum value. Returned MAngle and MDistance are always in radians and centimeters, respectively
Signature: getSoftMin()
Parameters:  
Returns: MAngle, MDistance or MTime
Description: Returns the attribute's soft minimum value. Raises a RuntimeError if the attribute does not have a soft minimum.
OpenMaya.MFnUnitAttribute.hasMax ( )
Returns True if the attribute has a hard maximum value.
Signature: hasMax()
Parameters:  
Returns: bool
Description: Returns True if a hard maximum value has been specified for the attribute.
OpenMaya.MFnUnitAttribute.hasMin ( )
Returns True if the attribute has a hard minimum value.
Signature: hasMin()
Parameters:  
Returns: bool
Description: Returns True if a hard minimum value has been specified for the attribute.
OpenMaya.MFnUnitAttribute.hasSoftMax ( )
Returns True if the attribute has a soft maximum value.
Signature: hasSoftMax()
Parameters:  
Returns: bool
Description: Returns True if a soft maximum value has been specified for the attribute.
OpenMaya.MFnUnitAttribute.hasSoftMin ( )
Returns True if the attribute has a soft minimum value.
Signature: hasSoftMin()
Parameters:  
Returns: bool
Description: Returns True if a soft minimum value has been specified for the attribute.
OpenMaya.MFnUnitAttribute.setMax ( )
Sets the attribute's hard maximum value.
Signature: setMax(maxValue)
Parameters: maxValue - float, MAngle, MDistance or MTime
Returns: Reference to self.
Description: Sets the attribute's hard maximum to maxValue
OpenMaya.MFnUnitAttribute.setMin ( )
Sets the attribute's hard minimum value.
Signature: setMin(minValue)
Parameters: minValue - float, MAngle, MDistance or MTime
Returns: Reference to self.
Description: Sets the attribute's hard minimum to minValue.
OpenMaya.MFnUnitAttribute.setSoftMax ( )
Sets the attribute's soft maximum value.
Signature: setSoftMax(maxValue)
Parameters: maxValue - float, MAngle, MDistance or MTime
Returns: Reference to self.
Description: Sets the attribute's soft maximum to maxValue.
OpenMaya.MFnUnitAttribute.setSoftMin ( )
Sets the attribute's soft minimum value.
Signature: setSoftMin(minValue)
Parameters: minValue - float, MAngle, MDistance or MTime
Returns: Reference to self.
Description: Sets the attribute's soft minimum to minValue.
OpenMaya.MFnUnitAttribute.unitType ( )
Returns the type of data handled by the attribute.
Signature: unitType()
Parameters:  
Returns: Unit Type constant
Description: Returns the type of data handled by the attribute.

Member Data Documentation

OpenMaya.MFnUnitAttribute.kAngle = 1
static
Name: kAngle
Type: int
Description:  
OpenMaya.MFnUnitAttribute.kDistance = 2
static
Name: kDistance
Type: int
Description:  
OpenMaya.MFnUnitAttribute.kInvalid = 0
static
Name: kInvalid
Type: int
Description:  
OpenMaya.MFnUnitAttribute.kLast = 4
static
Name: kLast
Type: int
Description: Last value. Used for counting.
OpenMaya.MFnUnitAttribute.kTime = 3
static
Name: kTime
Type: int
Description:  

Property Documentation

OpenMaya.MFnUnitAttribute.default = property(...)
static
 Default value
Name: default
Type: MAngle, MDistance or MTime
Access: RW
Description: Default value of attribute.