Use the new `action.fcurve_ensure_for_datablock()` function to ensure the opacity F-Curve exists. This function also ensures that the Action itself is ready for keying (it has a layer and a keyframe strip), and ensures the slot for the Scene exists and is assigned. Co-authored-by: Pratik Borhade <pratikborhade302@gmail.com> Pull Request: https://projects.blender.org/blender/blender/pulls/134753