π’Transform Node Attributes
Level: Beginner | Version 1.0 | Date: 30-March-2022 | By - Siddarth Mehra
1. translate(t) - double3
translateX (tx) - distance(double)
translateY (ty) - distance(double)
translateZ (tz) - distance(double)
Translation can be seen in channelBox and can be queried by -
import pymel.core as pm
obj = pm.PyNode('objName')
print(obj.getTranslation())
2. rotate(r) - double3
rotateX(rx) - angle(double)
rotateY (ry) - angle(double)
rotateZ (rz) - angle(double)
Rotation can be seen in channelBox and can be queried by -
import pymel.core as pm
obj = pm.PyNode('objName')
print(obj.getRotation())
3. scale(s) - double3
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())
4. shear(sh)- double3
shearXY(shxy) - double
shearXZ(shxz) - double
shearYZ(shyz) - double
Shear can be seen in AttributeEditor and can be queried by -
import pymel.core as pm
obj = pm.PyNode('objName')
print(obj.getShear())
5. rotateOrder(sh)- enum
Rotate order explanation for Rigging-
Rotate order explanation for animation -
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])
6. rotateAxis(ra)- double3
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)
Last updated
Was this helpful?