Posted: Mon Oct 22, 2012 9:52 pm
Joined: 22 Oct 2012
I am working on a remake of the mocap addon and I was wondering if there is a way to tell if a particular bone in an armature has a keyframe at a particular frame. Please forgive me if this question has come up before. Thank you.
ob = bpy.context.object
for fcu in ob.animation_data.action.fcurves:
if fcu.data_path.startswith('pose.bones.["%s"]' % BONE_NAME):
for pt in fcu.keyframe_points:
if pt.co == KEYFRAME_NUM:
you may wanna use round(pt.co) instead, as subframes are possible... _________________ I'm sitting, waiting, wishing, building Blender in superstition...