Python API 2.0 Reference
|
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(...) | |
Functionset for creating and working with angle, distance and time attributes. Method resolution order: - MFnUnitAttribute - MFnAttribute - MFnBase - builtins.object
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. |
def OpenMaya.MFnUnitAttribute.__init__ | ( | ) |
Initialize self. See help(type(self)) for accurate signature.
|
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 | ( | ) |
OpenMaya.MFnUnitAttribute.setMin | ( | ) |
OpenMaya.MFnUnitAttribute.setSoftMax | ( | ) |
OpenMaya.MFnUnitAttribute.setSoftMin | ( | ) |
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. |
|
static |
Name: | kAngle |
Type: | int |
Description: |
|
static |
Name: | kDistance |
Type: | int |
Description: |
|
static |
Name: | kInvalid |
Type: | int |
Description: |
|
static |
Name: | kLast |
Type: | int |
Description: | Last value. Used for counting. |
|
static |
Name: | kTime |
Type: | int |
Description: |