def rotate_components(rx, ry, rz, nodes=None):
"""Rotate the given nodes' components the given number of degrees about each axis.
:param rx: Degrees around x.
:param ry: Degrees around y.
:param rz: Degrees around z.
:param nodes: Optional list of curves.
"""
if nodes is None:
nodes = cmds.ls(sl=True) or []
for node in nodes:
pivot = cmds.xform(node, q=True, rp=True, ws=True)
cmds.rotate(rx, ry, rz, '{0}.cv[*]'.format(node), r=True, p=pivot, os=True, fo=True)
评论列表
文章目录