Python API 2.0 Reference
|
Static Public Member Functions | |
def | __new__ () |
Static Public Member Functions inherited from OpenMaya.MFnDagNode | |
def | __new__ () |
Static Public Member Functions inherited from OpenMaya.MFnDependencyNode | |
def | __new__ () |
def | allocateFlag () |
def | classification () |
def | deallocateAllFlags () |
def | deallocateFlag () |
Static Public Member Functions inherited from OpenMaya.MFnBase | |
def | __new__ () |
Additional Inherited Members | |
Properties inherited from OpenMaya.MFnDagNode | |
boundingBox = property(...) | |
inModel = property(...) | |
inUnderWorld = property(...) | |
isInstanceable = property(...) | |
isIntermediateObject = property(...) | |
objectColor = property(...) | |
objectColorRGB = property(...) | |
objectColorType = property(...) | |
useObjectColor = property(...) | |
Properties inherited from OpenMaya.MFnDependencyNode | |
isDefaultNode = property(...) | |
isFromReferencedFile = property(...) | |
isLocked = property(...) | |
isShared = property(...) | |
namespace = property(...) | |
pluginName = property(...) | |
typeId = property(...) | |
typeName = property(...) | |
Function set for operating on transform nodes. Method resolution order: - MFnTransform - MFnDagNode - MFnDependencyNode - MFnBase - builtins.object
MFnDagNode<h2>Constructors
Signature | Parameters | Description |
---|---|---|
MFnTransform() | Default constructor. Returns a new MFnTransform function set with no Maya object attached. | |
MFnTransform(object) | object - MObject | Returns a new MFnTransform function set, attached to the specified Maya object. |
MFnTransform(path) | object - MDagPath | Returns a new MFnTransform function set, attached to the specified DAG path. |
def OpenMaya.MFnTransform.__init__ | ( | ) |
Initialize self. See help(type(self)) for accurate signature.
|
static |
Create and return a new object. See help(type) for accurate signature.
OpenMaya.MFnTransform.clearRestPosition | ( | ) |
Clears the transform's rest position matrix.
Signature: | clearRestPosition() |
Parameters: | |
Returns: | Reference to self. |
Description: | Clears the transform's rest position matrix, effectively setting it to the identity matrix. |
OpenMaya.MFnTransform.create | ( | ) |
Creates a new transform node and attaches it to the function set.
Signature: | create(parent=MObject.kNullObj) |
Parameters: | parent - MObject |
Returns: | MObject |
Description: | Creates a new transform node, parents it under parent, attaches it to the function set and returns it in an MObject. If parent is MObject.kNullObj then the new transform will be parented under the world. |
OpenMaya.MFnTransform.enableLimit | ( | ) |
Enables or disables a specified limit type.
Signature: | enableLimit(limitType, state) |
Parameters: | limitType - Limit Type constant state - bool |
Returns: | Reference to self |
Description: | Enables or disables the specified limitType. |
OpenMaya.MFnTransform.isLimited | ( | ) |
Returns True if the specified limit type is enabled.
Signature: | isLimited(limitType) |
Parameters: | limitType - Limit Type constant |
Returns: | bool |
Description: | Returns True if the specified limitType is enabled. |
OpenMaya.MFnTransform.limitValue | ( | ) |
Returns the value of the specified limit.
Signature: | limitValue(limitType) |
Parameters: | limitType - Limit Type constant |
Returns: | float |
Description: | Returns the value of the specified limit. |
OpenMaya.MFnTransform.resetFromRestPosition | ( | ) |
Resets the transform from its rest position matrix.
Signature: | resetFromRestPosition() |
Parameters: | |
Returns: | Reference to self. |
Description: | Resets the transform from its rest position matrix. |
OpenMaya.MFnTransform.restPosition | ( | ) |
Returns the transform's rest position matrix.
Signature: | restPosition() |
Parameters: | |
Returns: | MTransformationMatrix |
Description: | Returns the transform's rest position matrix, or the identity matrix if no rest position has been set. |
OpenMaya.MFnTransform.rotateBy | ( | ) |
Adds an MEulerRotation or MQuaternion to the transform's rotation.
Signature: | rotateBy(rot, space) |
Parameters: | rot - MQuaternion or MEulerRotation space - MSpace constant |
Returns: | Reference to self. |
Description: | Adds rot to the transform's rotation component. |
OpenMaya.MFnTransform.rotateByComponents | ( | ) |
Adds to the transform's rotation using the individual components of an MEulerRotation or MQuaternion.
Signature: | rotateByComponents(seq, space, asQuaternion=False) |
Parameters: | seq - sequence of 4 floats or 3 floats and a Rotation Order constant space - MSpace constant asQuaternion - bool |
Returns: | Reference to self. |
Description: | Adds the rotation represented by the four parameter values to the transform's rotate component. If asQuaternion is True then seq must contain four floats representing the x, y, z and w components of a quaternion rotation. If asQuaternion is False then seq must contain three floats representing the x, y and z angles, followed by an MTransformationMatrix Rotation Order constant, which together form an Euler rotation. |
OpenMaya.MFnTransform.rotateOrientation | ( | ) |
Returns the MQuaternion which orients the local rotation space.
Signature: | rotateOrientation(space) |
Parameters: | space - MSpace constant |
Returns: | MQuaternion |
Description: | Returns the rotation which orients the local rotation space. |
OpenMaya.MFnTransform.rotatePivot | ( | ) |
OpenMaya.MFnTransform.rotatePivotTranslation | ( | ) |
OpenMaya.MFnTransform.rotation | ( | ) |
Returns the transform's rotation as an MEulerRotation or MQuaternion.
Signature: | rotation(space=MSpace.kTransform, asQuaternion=False) |
Parameters: | space - MSpace constant asQuaternion - bool |
Returns: | MEulerRotation or MQuaternion |
Description: | Returns the transform's rotation component as either an Euler rotation or a quaternion. |
OpenMaya.MFnTransform.rotationComponents | ( | ) |
Returns the transform's rotation as the individual components of an MEulerRotation or MQuaternion.
Signature: | rotationComponents(space=MSpace.kTransform, asQuaternion=False) |
Parameters: | space - MSpace constant asQuaternion - bool |
Returns: | [x, y, z, order] or [x, y, z, w] |
Description: | Returns a list containing the four components of the transform's rotate component. If asQuaternion is True then the first three elements are the quaternion's unreal x, y, and z components, and the fourth is its real w component. If asQuaternion is False then the first three components are the x, y and z Euler rotation angles and the fourth is an MTransformationMatrix Rotation Order constant. |
OpenMaya.MFnTransform.rotationOrder | ( | ) |
Returns the order of rotations when the transform's rotation is expressed as an MEulerRotation.
Signature: | rotationOrder() |
Parameters: | |
Returns: | MTransformationMatrix Rotation Order constant |
Description: | Returns the order of rotations when the transform's rotate component is expressed as an euler rotation. |
OpenMaya.MFnTransform.scale | ( | ) |
Returns a list containing the transform's XYZ scale components.
Signature: | scale() |
Parameters: | |
Returns: | [sx, sy, sz] |
Description: | Returns a list containing the transform's scale components. |
OpenMaya.MFnTransform.scaleBy | ( | ) |
Multiplies the transform's XYZ scale components by a sequence of three floats.
Signature: | scaleBy(seq) |
Parameters: | seq - sequence of 3 floats |
Returns: | Reference to self. |
Description: | Multiplies the transform's scale components by the three floats in seq. |
OpenMaya.MFnTransform.scalePivot | ( | ) |
OpenMaya.MFnTransform.scalePivotTranslation | ( | ) |
OpenMaya.MFnTransform.setLimit | ( | ) |
Sets the value of the specified limit.
Signature: | setLimit(limitType, value) |
Parameters: | limitType - Limit Type constant value - float |
Returns: | Reference to self |
Description: | Sets the value of the specified limit. |
OpenMaya.MFnTransform.setRestPosition | ( | ) |
Sets the transform's rest position matrix.
Signature: | setRestPosition(matrix) |
Parameters: | matrix - MTransformationMatrix |
Returns: | Reference to self. |
Description: | Sets the transform's rest position matrix. |
OpenMaya.MFnTransform.setRotateOrientation | ( | ) |
Sets the MQuaternion which orients the local rotation space.
Signature: | setRotateOrientation(rot, space, balance) |
Parameters: | rot - MQuaternion space - MSpace constant balance - bool |
Returns: | |
Description: | Sets the rotation which orients the local rotation space. If balance is True then the transform's other components will be adjusted to give the same overall transformation as before. |
OpenMaya.MFnTransform.setRotatePivot | ( | ) |
OpenMaya.MFnTransform.setRotatePivotTranslation | ( | ) |
OpenMaya.MFnTransform.setRotation | ( | ) |
Sets the transform's rotation using an MEulerRotation or MQuaternion.
Signature: | setRotation(rot, space) |
Parameters: | rot - MQuaternion or MEulerRotation space - MSpace constant |
Returns: | Reference to self. |
Description: | Sets the transform's rotation component to rot. |
OpenMaya.MFnTransform.setRotationComponents | ( | ) |
Sets the transform's rotation using the individual components of an MEulerRotation or MQuaternion.
Signature: | setRotationComponents(seq, space=MSpace.kTransform, asQuaternion=False) |
Parameters: | seq - sequence of 4 floats or 3 floats and a Rotation Order constant space - MSpace constant asQuaternion - bool |
Returns: | Reference to self. |
Description: | Sets the transform's rotate component. If asQuaternion is True then seq must contain four floats representing the x, y, z and w components of a quaternion rotation. If asQuaternion is False then seq must contain three floats representing the x, y and z angles, followed by an MTransformationMatrix Rotation Order constant, which together form an Euler rotation. |
OpenMaya.MFnTransform.setRotationOrder | ( | ) |
Sets the transform's rotation order.
Signature: | setRotationOrder(order, reorder) |
Parameters: | order - MTransformationMatrix Rotation Order constant reorder - bool |
Returns: | Reference to self. |
Description: | Sets the transform's rotation order. If reorder is True then the X, Y and Z rotations will be modified so that the resulting rotation under the new order is the same as it was under the old. If reorder is False then the X, Y and Z rotations are unchanged. |
OpenMaya.MFnTransform.setScale | ( | ) |
Sets the transform's scale components.
Signature: | setScale(seq) |
Parameters: | seq - sequence of 3 floats |
Returns: | Reference to self. |
Description: | Sets the transform's scale components to the three floats in seq. |
OpenMaya.MFnTransform.setScalePivot | ( | ) |
OpenMaya.MFnTransform.setScalePivotTranslation | ( | ) |
OpenMaya.MFnTransform.setShear | ( | ) |
Sets the transform's shear.
Signature: | setShear(seq) |
Parameters: | seq - sequence of 3 floats |
Returns: | Reference to self. |
Description: | Sets the transform's shear component. |
OpenMaya.MFnTransform.setTransformation | ( | ) |
Sets the transform's attribute values to represent the given transformation matrix.
Signature: | setTransformation(transformation) |
Parameters: | transformation - MTransformationMatrix |
Returns: | Reference to self |
Description: | Sets this transform's attribute values to represent the given transformation matrix. |
OpenMaya.MFnTransform.setTranslation | ( | ) |
OpenMaya.MFnTransform.shear | ( | ) |
Returns a list containing the transform's shear components.
Signature: | shear() |
Parameters: | |
Returns: | [x, y, z] |
Description: | Returns a list containing the transform's shear component. |
OpenMaya.MFnTransform.shearBy | ( | ) |
Multiplies the transform's shear components by a sequence of three floats.
Signature: | shearBy(seq) |
Parameters: | seq - sequence of 3 floats |
Returns: | Reference to self. |
Description: | Multiplies the transform's shear components by the elements of seq. |
OpenMaya.MFnTransform.transformation | ( | ) |
Returns the transformation matrix represented by this transform.
Signature: | transformation() |
Parameters: | |
Returns: | MTransformationMatrix |
Description: | Returns the transformation matrix represented by this transform. |
OpenMaya.MFnTransform.translateBy | ( | ) |
OpenMaya.MFnTransform.translation | ( | ) |
|
static |
Name: | kRotateMaxX |
Type: | int |
Description: |
|
static |
Name: | kRotateMaxY |
Type: | int |
Description: |
|
static |
Name: | kRotateMaxZ |
Type: | int |
Description: |
|
static |
Name: | kRotateMinX |
Type: | int |
Description: |
|
static |
Name: | kRotateMinY |
Type: | int |
Description: |
|
static |
Name: | kRotateMinZ |
Type: | int |
Description: |
|
static |
Name: | kScaleMaxX |
Type: | int |
Description: |
|
static |
Name: | kScaleMaxY |
Type: | int |
Description: |
|
static |
Name: | kScaleMaxZ |
Type: | int |
Description: |
|
static |
Name: | kScaleMinX |
Type: | int |
Description: |
|
static |
Name: | kScaleMinY |
Type: | int |
Description: |
|
static |
Name: | kScaleMinZ |
Type: | int |
Description: |
|
static |
Name: | kShearMaxXY |
Type: | int |
Description: |
|
static |
Name: | kShearMaxXZ |
Type: | int |
Description: |
|
static |
Name: | kShearMaxYZ |
Type: | int |
Description: |
|
static |
Name: | kShearMinXY |
Type: | int |
Description: |
|
static |
Name: | kShearMinXZ |
Type: | int |
Description: |
|
static |
Name: | kShearMinYZ |
Type: | int |
Description: |
|
static |
Name: | kTranslateMaxX |
Type: | int |
Description: |
|
static |
Name: | kTranslateMaxY |
Type: | int |
Description: |
|
static |
Name: | kTranslateMaxZ |
Type: | int |
Description: |
|
static |
Name: | kTranslateMinX |
Type: | int |
Description: |
|
static |
Name: | kTranslateMinY |
Type: | int |
Description: |
|
static |
Name: | kTranslateMinZ |
Type: | int |
Description: |