I am attempting to make an addon/script with blender python that works with mocap files (.bvh), my problem is that when the files are imported the group collection on fcurve.group is blank
for fcurve in bpy.context.active_object.animation_data.action.fcurves: if fcurve.group is not None: print(text='Source object fcurve group ' + fcurve.group.name)
How do I create and assign a group to the fcurve with python script?
fcurve.group = bpy.types.FCurve.new("LocRot") #what i tried first
Explanation of why: When i import the files they have rotation mode XZY Euler on all the bones, I am attempting to use this script to convert the rotation mode to Quaternion however it fails due to the fact that the bones have no groups on them.... (hence my question)
Ultimately I plan to make my own pipeline which handles the small problems I have with the .bvh files when imported, such as converting FK -> IK