def connect_transforms(source="", target = "", t=True, r=True, s=True, *args):
"""
simple direct connection between transform attrs
Args:
source (string): object connections come FROM
target (string): object connections go to
t (bool): do translates?
r (bool): do rotations?
s (bool): do scales?
Return:
None
"""
if source and target:
if t:
cmds.connectAttr("{0}.t".format(source), "{0}.t".format(target))
if r:
cmds.connectAttr("{0}.r".format(source), "{0}.r".format(target))
if s:
cmds.connectAttr("{0}.s".format(source), "{0}.s".format(target))
评论列表
文章目录