OpenMaya.MFnUnitAttribute Class Reference
Functionset for creating and working with angle, distance and time attributes.
Method resolution order:
- MFnUnitAttribute
- MFnAttribute
- MFnBase
- __builtin__.object
Base Class
MFnAttribute<h2>Constructors
Signature Parameters Description
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 .
OpenMaya.MFnUnitAttribute.__init__
(
)
x.__init__(...) initializes x; see help(type(x)) for 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.
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:
OpenMaya.MFnUnitAttribute.default
static