# How to find out what particular vector component is animated?

I can iterate over animation f-curves of an object and identify animated properties through data_path attribute:

o = bpy.data.objects['myObj']
fcurves = o.animation_data.action.fcurves
for fc in fcurves:
print(fc.data_path)


I also need to distinguish between different vector components for properties like 'rotation_euler'. When all 3 of them are animated they can be identified by their relative order, but I can't find a way to identify individual components when only 1 or 2 of them are animated. How can it be done?

The vector components are accessible through the fc.array_index value. If you only animate the X and Z components, you'll see that they are still indices 0 and 2, not 0 and 1.