def copySingle(source=None, destination=None, pasteMethod='replace', offset=0, addToLayer=False, rotateOrder=True):
'''
Copy animation from a source node and paste it to a destination node
'''
start, end = _getStartAndEnd()
if not source and not destination:
sel = mc.ls(sl=True)
if len(sel) != 2:
OpenMaya.MGlobal.displayWarning('Please select exactly 2 objects.')
return
source = sel[0]
destination = sel[1]
layer = None
if addToLayer:
layer = utl.createAnimLayer(destination, namePrefix='ml_cp')
copyAnimation(source=source, destination=destination, pasteMethod=pasteMethod, offset=offset, start=start, end=end, layer=layer, rotateOrder=rotateOrder)
#if sel:
#mc.select(sel)
评论列表
文章目录