I'm trying to write a script that would iterate over all keyframes on the selected armature and then advance the timeline to compare the previous keyframe to the current to see if it's identical. If it stays identical throughout the entire timeline let's say 1-240 frames then it should delete the entire keyframe row/action.
My main issue is that I'm not sure on how to access the keyframe data or fcurve data to then later do a comparison between the current frame and the previous.
obj.animation_data.action.fcurves[i].keyframe_points[j].coThe answer to your question is also in https://blender.stackexchange.com/questions/64447/how-do-i-add-keyframes-to-a-newly-created-action-with-no-associated-objects – Mutant Bob Sep 25 '17 at 17:29bpy.ops.graph.clean()andbpy.ops.graph.smooth()These can be run from graph editor by selecting curves and choosing smooth or clean from Keys menu, to see if they give desired result. – batFINGER Sep 25 '17 at 17:40