Accessing Keyframe data for a Blend Shape

298 views
Skip to first unread message

paul.th...@gmail.com

unread,
Mar 17, 2016, 2:48:28 PM3/17/16
to Python Programming for Autodesk Maya
Hey y'all, so I'm trying to write a tool that can export animation data to a text file. I don't want to just print values for every frame, instead I would like to export only values at keyframes.

I have it working for transform data by using maya.cmds.GetAttr() to get data and maya.cmds.keyframe() to get a list of keyframes. However I have not been able to get keyframe() to give me a list of keyframes for blend shape animations which is a requirement for this tool. Are there any other methods that I could try that could give me a list of blend shape keyframes?

Thanks,
Paul

Jesse Capper

unread,
Apr 21, 2016, 5:30:51 PM4/21/16
to Python Programming for Autodesk Maya
Simple sinppet that gives you keyframe data for each blendshape target

for attr in cmds.listAttr('blendShape1.weight', multi=True):
   
print attr, cmds.keyframe('blendShape1', attribute=attr, q=True, tc=True, vc=True)
Reply all
Reply to author
Forward
0 new messages