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

Public Member Functions

def __init__ ()
 
def clearRestPosition ()
 
def create ()
 
def enableLimit ()
 
def isLimited ()
 
def limitValue ()
 
def resetFromRestPosition ()
 
def restPosition ()
 
def rotateBy ()
 
def rotateByComponents ()
 
def rotateOrientation ()
 
def rotatePivot ()
 
def rotatePivotTranslation ()
 
def rotation ()
 
def rotationComponents ()
 
def rotationOrder ()
 
def scale ()
 
def scaleBy ()
 
def scalePivot ()
 
def scalePivotTranslation ()
 
def setLimit ()
 
def setRestPosition ()
 
def setRotateOrientation ()
 
def setRotatePivot ()
 
def setRotatePivotTranslation ()
 
def setRotation ()
 
def setRotationComponents ()
 
def setRotationOrder ()
 
def setScale ()
 
def setScalePivot ()
 
def setScalePivotTranslation ()
 
def setShear ()
 
def setTransformation ()
 
def setTranslation ()
 
def shear ()
 
def shearBy ()
 
def transformation ()
 
def translateBy ()
 
def translation ()
 
- Public Member Functions inherited from OpenMaya.MFnDagNode
def __init__ ()
 
def addChild ()
 
def child ()
 
def childCount ()
 
def create ()
 
def dagPath ()
 
def dagRoot ()
 
def duplicate ()
 
def fullPathName ()
 
def getAllPaths ()
 
def getConnectedSetsAndMembers ()
 
def getPath ()
 
def hasChild ()
 
def hasParent ()
 
def instanceCount ()
 
def isChildOf ()
 
def isInstanced ()
 
def isInstancedAttribute ()
 
def isParentOf ()
 
def parent ()
 
def parentCount ()
 
def partialPathName ()
 
def removeChild ()
 
def removeChildAt ()
 
def setObject ()
 
def transformationMatrix ()
 
- Public Member Functions inherited from OpenMaya.MFnDependencyNode
def __init__ ()
 
def absoluteName ()
 
def addAttribute ()
 
def addExternalContentForFileAttr ()
 
def affectsAnimation ()
 
def attribute ()
 
def attributeClass ()
 
def attributeCount ()
 
def canBeWritten ()
 
def create ()
 
def dgCallbackIds ()
 
def dgCallbacks ()
 
def dgTimer ()
 
def dgTimerOff ()
 
def dgTimerOn ()
 
def dgTimerQueryState ()
 
def dgTimerReset ()
 
def findAlias ()
 
def findPlug ()
 
def getAffectedAttributes ()
 
def getAffectingAttributes ()
 
def getAliasAttr ()
 
def getAliasList ()
 
def getConnections ()
 
def getExternalContent ()
 
def hasAttribute ()
 
def hasUniqueName ()
 
def isFlagSet ()
 
def isNewAttribute ()
 
def isTrackingEdits ()
 
def name ()
 
def plugsAlias ()
 
def removeAttribute ()
 
def reorderedAttribute ()
 
def setAffectsAnimation ()
 
def setAlias ()
 
def setDoNotWrite ()
 
def setExternalContent ()
 
def setExternalContentForFileAttr ()
 
def setFlag ()
 
def setName ()
 
def setUuid ()
 
def uniqueName ()
 
def userNode ()
 
def uuid ()
 
- 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.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__ ()
 

Static Public Attributes

Limit Types
int kRotateMaxX = 13
 
int kRotateMaxY = 15
 
int kRotateMaxZ = 17
 
int kRotateMinX = 12
 
int kRotateMinY = 14
 
int kRotateMinZ = 16
 
int kScaleMaxX = 1
 
int kScaleMaxY = 3
 
int kScaleMaxZ = 5
 
int kScaleMinX = 0
 
int kScaleMinY = 2
 
int kScaleMinZ = 4
 
int kShearMaxXY = 7
 
int kShearMaxXZ = 9
 
int kShearMaxYZ = 11
 
int kShearMinXY = 6
 
int kShearMinXZ = 8
 
int kShearMinYZ = 10
 
int kTranslateMaxX = 19
 
int kTranslateMaxY = 21
 
int kTranslateMaxZ = 23
 
int kTranslateMinX = 18
 
int kTranslateMinY = 20
 
int kTranslateMinZ = 22
 
- Static Public Attributes inherited from OpenMaya.MFnDagNode
int kNextPos = 255
 
- Static Public Attributes inherited from OpenMaya.MFnDependencyNode
int kTimerMetrics = 9
 
int kTimerTypes = 3
 
int kExtensionAttr = 3
 
int kInvalidAttr = 4
 
int kLocalDynamicAttr = 1
 
int kNormalAttr = 2
 
int kTimerInvalidState = 3
 
int kTimerOff = 0
 
int kTimerOn = 1
 
int kTimerUninitialized = 2
 
int kTimerMetric_callback = 0
 
int kTimerMetric_callbackNotViaAPI = 6
 
int kTimerMetric_callbackViaAPI = 5
 
int kTimerMetric_compute = 1
 
int kTimerMetric_computeDuringCallback = 7
 
int kTimerMetric_computeNotDuringCallback = 8
 
int kTimerMetric_dirty = 2
 
int kTimerMetric_draw = 3
 
int kTimerMetric_fetch = 4
 
int kTimerType_count = 2
 
int kTimerType_inclusive = 1
 
int kTimerType_self = 0
 

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(...)
 

Detailed Description

Function set for operating on transform nodes.

Method resolution order:
-   MFnTransform
-   MFnDagNode
-   MFnDependencyNode
-   MFnBase
-   builtins.object

Base Class

MFnDagNode<h2>Constructors

SignatureParametersDescription
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.

 


Constructor & Destructor Documentation

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

Member Function Documentation

def OpenMaya.MFnTransform.__new__ ( )
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 ( )
Returns the transform's rotate pivot.
Signature: rotatePivot(space)
Parameters: space - MSpace constant
Returns: MPoint
Description: Returns the transform's rotate pivot component.
OpenMaya.MFnTransform.rotatePivotTranslation ( )
Returns the transform's rotate pivot translation.
Signature: rotatePivotTranslation(space)
Parameters: space - MSpace constant
Returns: MVector
Description: Returns the transform's rotate pivot translation component.
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 ( )
Returns the transform's scale pivot.
Signature: scalePivot(space)
Parameters: space - MSpace constant
Returns: MPoint
Description: Returns the transform's scale pivot component.
OpenMaya.MFnTransform.scalePivotTranslation ( )
Returns the transform's scale pivot translation.
Signature: scalePivotTranslation(space)
Parameters: space - MSpace constant
Returns: MVector
Description: Returns the transform's scale pivot translation component.
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 ( )
Sets the transform's rotate pivot.
Signature: setRotatePivot(pivot, space, balance))
Parameters: pivot - MPoint
space - MSpace constant
balance - bool
Returns: Reference to self.
Description: Sets the transform's rotate pivot component.
OpenMaya.MFnTransform.setRotatePivotTranslation ( )
Sets the transform's rotate pivot translation.
Signature: setRotatePivotTranslation(trans, space)
Parameters: trans - MVector
space - MSpace constant
Returns: Reference to self.
Description: Sets the transform's rotate pivot translation component.
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 ( )
Sets the transform's scale pivot.
Signature: setScalePivot(pivot, space, balance)
Parameters: pivot - MPoint
space - MSpace constant
balance - bool
Returns: Reference to self.
Description: Sets the transform's scale pivot component.
OpenMaya.MFnTransform.setScalePivotTranslation ( )
Sets the transform's scale pivot translation.
Signature: setScalePivotTranslation(trans, space)
Parameters: trans - MVector
space - MSpace constant
Returns: Reference to self.
Description: Sets the transform's scale pivot translation component.
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 ( )
Sets the transform's translation.
Signature: setTranslation(trans, space)
Parameters: trans - MVector
space - MSpace constant
Returns: Reference to self.
Description: Sets the transform's translation component.
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 ( )
Adds an MVector to the transform's translation.
Signature: translateBy(vec, space)
Parameters: vec - MVector
space - MSpace constant
Returns: Reference to self.
Description: Adds vec to the transform's translation component.
OpenMaya.MFnTransform.translation ( )
Returns the transform's translation as an MVector.
Signature: translation(space)
Parameters: space - MSpace constant
Returns: MVector
Description: Returns the transform's translation component as a vector.

Member Data Documentation

OpenMaya.MFnTransform.kRotateMaxX = 13
static
Name: kRotateMaxX
Type: int
Description:  
OpenMaya.MFnTransform.kRotateMaxY = 15
static
Name: kRotateMaxY
Type: int
Description:  
OpenMaya.MFnTransform.kRotateMaxZ = 17
static
Name: kRotateMaxZ
Type: int
Description:  
OpenMaya.MFnTransform.kRotateMinX = 12
static
Name: kRotateMinX
Type: int
Description:  
OpenMaya.MFnTransform.kRotateMinY = 14
static
Name: kRotateMinY
Type: int
Description:  
OpenMaya.MFnTransform.kRotateMinZ = 16
static
Name: kRotateMinZ
Type: int
Description:  
OpenMaya.MFnTransform.kScaleMaxX = 1
static
Name: kScaleMaxX
Type: int
Description:  
OpenMaya.MFnTransform.kScaleMaxY = 3
static
Name: kScaleMaxY
Type: int
Description:  
OpenMaya.MFnTransform.kScaleMaxZ = 5
static
Name: kScaleMaxZ
Type: int
Description:  
OpenMaya.MFnTransform.kScaleMinX = 0
static
Name: kScaleMinX
Type: int
Description:  
OpenMaya.MFnTransform.kScaleMinY = 2
static
Name: kScaleMinY
Type: int
Description:  
OpenMaya.MFnTransform.kScaleMinZ = 4
static
Name: kScaleMinZ
Type: int
Description:  
OpenMaya.MFnTransform.kShearMaxXY = 7
static
Name: kShearMaxXY
Type: int
Description:  
OpenMaya.MFnTransform.kShearMaxXZ = 9
static
Name: kShearMaxXZ
Type: int
Description:  
OpenMaya.MFnTransform.kShearMaxYZ = 11
static
Name: kShearMaxYZ
Type: int
Description:  
OpenMaya.MFnTransform.kShearMinXY = 6
static
Name: kShearMinXY
Type: int
Description:  
OpenMaya.MFnTransform.kShearMinXZ = 8
static
Name: kShearMinXZ
Type: int
Description:  
OpenMaya.MFnTransform.kShearMinYZ = 10
static
Name: kShearMinYZ
Type: int
Description:  
OpenMaya.MFnTransform.kTranslateMaxX = 19
static
Name: kTranslateMaxX
Type: int
Description:  
OpenMaya.MFnTransform.kTranslateMaxY = 21
static
Name: kTranslateMaxY
Type: int
Description:  
OpenMaya.MFnTransform.kTranslateMaxZ = 23
static
Name: kTranslateMaxZ
Type: int
Description:  
OpenMaya.MFnTransform.kTranslateMinX = 18
static
Name: kTranslateMinX
Type: int
Description:  
OpenMaya.MFnTransform.kTranslateMinY = 20
static
Name: kTranslateMinY
Type: int
Description:  
OpenMaya.MFnTransform.kTranslateMinZ = 22
static
Name: kTranslateMinZ
Type: int
Description: