title: Any way to set multiple keys and values at once in Maya using python?
body: <p>I'm looking for a solution, that allows to set list of values </p>
  
  <pre><code>[0,1,2]
  </code></pre>
  
  <p>over given list of times</p>
  
  <pre><code>[0,1,2]
  </code></pre>
  
  <p>at once, without loop, like this:</p>
  
  <pre><code>for frame, value in zip([0,1,2], [0,1,2]):
      cmds.keyframe(node, e=True, vc=value, t=frame)
  </code></pre>
  
  <p>There are commands</p>
  
  <pre><code>cmds.setKeyframe()
  </code></pre>
  
  <p>and </p>
  
  <pre><code>cmds.keyframe()
  </code></pre>
  
  <p>that allow to set animation keys at a given time 
  But non of them allow to set range of value over the range of time (frames).</p>
  
  <p>The same value can be put on the time range, but that's not the case.</p>
  
  <pre><code>mel.eval("setKeyframe -e -v %s -t 0 -t 1 -t 2 %s" % (value, node))
  </code></pre>
  
  <p>I tried to get attributes of the animation curve node, that stores keys inside,
  but got an empty output.</p>
  
  <pre><code>node = '...'
  types = cmds.listAttr(node)
  
  for t in types:
      if cmds.objExists(node+t):
          try:
              print t, cmds.getAttr(node+t)
          except:
              print 'failed with', t
              continue
  
  ...
  keyTimeValue [()]
  ...
  </code></pre>