The docs for the "time" attribute are a little confusing. Probably a bad translation from the mel version. But the examples below it, and your traceback error are pretty helpful about the correct format. http://download.autodesk.com/us/maya/2010help/CommandsPython/keyframe.html#hExamples
It requires a tuple representing a time range: (start, [end]) The brackets around the end imply its optional. If you are only doing one frame, you will see it like this: (5, 5) You can do a singly element tuple like: (5, ) I forget if thats valid though. The error suggests its fine. On Jun 2, 2012, at 9:14 AM, Bradon Webb <[email protected]> wrote: > I have a keyframed object and and I want to query it at 2 different > times so I can define the magnitude of change over time. > > here is what I have for query the keyframe at current time. this > works fine: > > selectedNode = mc.ls(selection=True)[0] > keyframe = mc.keyframe(selectedNode, query=True, eval=True) > print keyframe > > but when I try to specify time it wont work: > > selectedNode = mc.ls(selection=True)[0] > keyframe = mc.keyframe(selectedNode, query=True, eval=True, > time=5) > print keyframe > > # Error: TypeError: Invalid arguments for flag 'time'. Expected > (time, [time]), got int # > > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
