gsee

AM_DeleteNextKey py2.7

Feb 20th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. #Delete the next key from your selection (work only on your timeline)      
  2.  
  3. import maya.cmds as mc
  4.  
  5. sel = mc.ls(sl=True, flatten=True)
  6. ctime = mc.currentTime(query=True)
  7. playback = mc.playbackOptions(animationStartTime=True, query=True), mc.playbackOptions(animationEndTime=True, query=True)
  8. nextkey = mc.findKeyframe(which='next')
  9.  
  10. for obj in sel:
  11.     if nextkey > playback[0] and nextkey <= playback[1]:
  12.         mc.cutKey(cl=True,time=(nextkey, nextkey))
Add Comment
Please, Sign In to add comment