I have 2 bones at the exact same location and in the same armature. I also have an action and a set of FCurves which are all assigned to the same bone.
Now i need to "move" the fcurves from that bone to the other bone. I first tried to simply edit the fcurve.data_path:
original path: 'pose.bones["mHipLeft"].location' my edit : fcurve.data_path='pose.bones["HipLeft"].location'
But this did not move the FCurve to the other bone. Possibly i made it wrong, or i forgot an update somewhere?
I also looked into the Blender API and i searched in the release/script folder but i could not find anything about "move an fcurve".
Now the only other idea that i have is to Create new FCurves, copy the data and then delete the original FCurves. But this looks like a lot of trouble. So before i go this way maybe someone knows an easier solution for this?
And in the case when the only option is to copy the FCurves, then is it sufficient to do the copy in this way? (I found this in the addon library):
def copyFCurve(newCurve, oldCurve): for point in oldCurve.keyframe_points: newCurve.keyframe_points.insert(frame=point.co.x, value=point.co.y)