Scripting in Blender with Python, and working on the API
2 posts • Page 1 of 1
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.
maybe like this?
you may wanna use round(pt.co) instead, as subframes are possible...
Code: Select all
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: # found break
I'm sitting, waiting, wishing, building Blender in superstition...
Who is online
Users browsing this forum: No registered users and 2 guests