Checked out the docs, it's looking for a tuple, the tricky bit is working out how to give it a number that means "till the end of time"
cmds.keyframe(time=(50,10000), relative=1, timeChange=1,option="over") On Mon, Jun 8, 2009 at 6:34 PM, Chadrik <[email protected]> wrote: > > i saw this post over at cgtalk and was surprised to find the answer so > elusive: http://forums.cgsociety.org/showthread.php?f=89&t=772302 > > here's the post: > --------------------------------------- > I am trying to convert this mel code to python but I can't get the > time attribute working properly. > mel: > > keyframe -time "50:" -relative -timeChange 1 -option over; > > > I tried this python equivalent: > > cmds.keyframe(time=(50:), relative=1, timeChange=1, > option="over") > # TypeError: Invalid arguments for flag 'time'. Expected (time, > [time]), got int # > > > I also tried with quotes, without quotes, with a comma, without a > comma, etc. The only time i get the python equivalent working is if i > set a timeRange to time=(startInt,endInt) i would like to specify time= > (startInt, *onward*) > > > --------end--------- > > i was very surprised to find that neither of these worked: > > cmds.keyframe(time=(50,), relative=1, timeChange=1, option="over") > cmds.keyframe(time=(50,None), relative=1, timeChange=1, option="over") > > i tested this in 2009 > > -chad > > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
