def delete_later_keys(obj, frame, *args):
"""sets a key at 'frame' and then deletes all subsequent keys in the timeline (time based only)"""
animTypes = ["animCurveTL","animCurveTA", "animCurveTT", "animCurveTU"]
animNodes = cmds.listConnections(obj, type="animCurve")
if not animNodes:
return()
for a in animNodes:
if (cmds.objectType(a)in animTypes):
cmds.setKeyframe(a, time=frame)
cmds.cutKey(a,clear=1, time=(frame + 1, 100000))
评论列表
文章目录