def offset_orient(joints, amount, axis):
"""Offsets the orient by the given amount
@param joints: Joints to orient.
@param amount: Amount to offset by.
@param axis: Which axis X, Y or Z
"""
for joint in joints:
children = _unparent_children(joint)
attribute = '{0}.jointOrient{1}'.format(joint, axis)
orient = cmds.getAttr(attribute)
orient += amount
cmds.setAttr(attribute, orient)
_reparent_children(joint, children)
if joints:
cmds.select(joints)
评论列表
文章目录