description |
---|
Level: Beginner | Version 1.0 | Date: 30-March-2022 | By - Siddarth Mehra |
Attribute Index
- translateX (tx) - distance(double)
- translateY (ty) - distance(double)
- translateZ (tz) - distance(double)
Specifies the object’s translation (Translate X, Y, and Z) attribute values in world space
Translation can be seen in channelBox and can be queried by -
import pymel.core as pm
obj = pm.PyNode('objName')
print(obj.getTranslation())
- rotateX(rx) - angle(double)
- rotateY (ry) - angle(double)
- rotateZ (rz) - angle(double)
Specifies the object's scale ( Scale X, Y, and Z) attribute values in local space
Rotation can be seen in channelBox and can be queried by -
import pymel.core as pm
obj = pm.PyNode('objName')
print(obj.getRotation())
- scaleX(sx) - double
- scaleY (sy) - double
- scaleZ (sz) - double
Scale can be seen in channelBox and can be queried by -
import pymel.core as pm
obj = pm.PyNode('objName')
print(obj.getScale())
- shearXY(shxy) - double
- shearXZ(shxz) - double
- shearYZ(shyz) - double
When the Shear XYZ values are changed from 0,0,0, shears or non-proportionately scales the selected geometry.
Shear can be seen in AttributeEditor and can be queried by -
import pymel.core as pm
obj = pm.PyNode('objName')
print(obj.getShear())
{% embed url="https://youtu.be/urC_TBQQA7o?t=470" %} Kinda starts at 10:00 but to understand it properly watch from 8:23 {% endembed %}
{% embed url="https://vimeo.com/54541692" %}
This attribute controls the order in which rx, ry, rz are applied in the transformation matrix. Valid values for this attribute are 0=xyz, 1=yzx, 2=zxy, 3=xzy, 4=yxz, 5=zyx.
RotateOrder can be seen in AttributeEditor and can be queried by -
import pymel.core as pm
obj = pm.PyNode('objName')
order = obj.rotateOrder.get()
orderDict = {0:'xyz', 1:'yzx', 2:'zxy', 3:'xzy', 4:'yxz', 5:'zyx'}
print (orderDict[order])
- rotateAxisX(rax) - angle(double)
- rotateAxisY(ray) - angle(double)
- rotateAxisZ(raz) - angle(double)
rotateAxis can be seen in AttributeEditor and can be queried by -
import pymel.core as pm
obj = pm.PyNode('objName')
roAxis = obj.rotateAxis.get()
print (roAxis)