Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tmin = cmds.playbackOptions(q=1,min=1)
- tmax = cmds.playbackOptions(q=1,max=1)
- namespaces = list(set([i.split(':')[0] for i in cmds.ls(sl=1) if ':' in i]))
- _ctrl_ = 'nurbsCircle1'
- infinity_type = cmds.setInfinity(_ctrl_,attribute='t',q=1,poi=1)[0]
- first_key = cmds.keyframe(_ctrl_,attribute='tx',q=1)[0]
- last_key = cmds.keyframe(_ctrl_,attribute='tx',q=1)[-1]
- cycle_length = last_key-first_key
- cmds.copyKey(_ctrl_,t=(first_key,last_key))
- paste_position = last_key
- while paste_position + cycle_length <= tmax + cycle_length:
- cmds.pasteKey(_ctrl_,t=(paste_position,paste_position))
- paste_position += cycle_length
- paste_position = first_key - cycle_length
- while paste_position >= tmin + 30 - cycle_length:
- cmds.pasteKey(_ctrl_,t=(paste_position,paste_position),o='merge')
- paste_position -= cycle_length
- # cmds.pasteKey(_ctrl_,t=(paste_position,paste_position))
Add Comment
Please, Sign In to add comment