Skip to content

Instantly share code, notes, and snippets.

@fereria
Created March 18, 2014 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fereria/9619256 to your computer and use it in GitHub Desktop.
Save fereria/9619256 to your computer and use it in GitHub Desktop.
getDrivenKeyInfo
def getDrivenKeyInfo():
selection = pm.ls(sl=True)
animKey = []
for sel in selection:
animKey += getDrivenKey(sel)
retVal = {}
for anim in animKey:
setDic = {}
keys = anim.numKeys()
setDic["driver"] = anim.input.connections(p=True)[0].name()
setDic["driven"] = anim.output.connections(p=True)[0].name()
setDic["key"] = []
for i in range(0,keys):
val = anim.getValue(i)
timeVal = anim.getUnitlessInput(i)
setDic["key"].append((timeVal,val))
retVal[anim.name()] = setDic
return retVal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment