Created
March 18, 2014 12:39
-
-
Save fereria/9619256 to your computer and use it in GitHub Desktop.
getDrivenKeyInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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