Frustration finding F-Curves, finally fixed fumbling functionality
As you may know, all animations are organized in FCurves.
Handling that was easy, before Blender 4.4 started to change the structure of actions.
If you use the usual way in Python by setting a value like the location of an object and use "keyframe_insert" to add a keyframe, existing code will work like before. Blender automatically creates an action for the object and adds the fcurves and keyframe_points to it. You find it under action.fcurves. There you can also remove it and so on.
Starting with Blender 4.4 there is a new structure for that and this will be standard in future. You will not see that currently as the old method still works. But if you start to use what Blender 4.4 offers: Creating only one action and insert each and all animations (by script or with UI) into it then the problem or maybe bug(?) is that "action.fcurves" will not be filled anymore.
That means: Code to access fcurves like before will break, it will not find the fcurves anymore.
They are still here, but now you find them in action -> layers -> strips -> channelbags -> fcurves
Here are the details:
I've made two functions to make sure that setting interpolation and removing keyframes, both in a range of start/end frame, is easier. It tries to find the fcurves first in the new structure (because also with the old method they will be always also inserted here) and if it was not found, it uses the old methods.
As this accesses the new structure I guess these functions will not work in previous Blender versions.
If you are interested, I've attached them here.
3
1 comment
Christian Coppes
5
Frustration finding F-Curves, finally fixed fumbling functionality
CG Python Academy (Free)
skool.com/cgpython
3D artists learning Blender Python.
Leaderboard (30-day)
Powered by