import maya.cmds as cmds cube=cmds.polyCube()[0] cmds.setKeyframe(cube,t=[0,8,25]) cmds.keyframe('%s_visibility' % cube, edit=True, r=True, timeChange=5, time=(0,8), option = "insert")
I'm trying to add to the Red9 animTools and want to be able to offset an entire hierarchies animations in one go, this is already supported however I want to add the ability of specifying a timeRange. Imaging you have a huge chunk of anim data and want to shift a section of it for a character by 10 frames. Currently shifting keys in the timeline won't ripple, it uses the segmentOver and causes a mess. Also you need to have all the objects selected when doing it and there's no numeric input. So I want to add it to the offestTime code.
This is all up and running except I've hit another crash bug, 100% repeatable crash and it boils down to the 'option' flag as used above. Give it a go, boom. Now I accept that in this case the sparse keys are an issue, but really the code should catch this.
cheers
Mark