I am unsure whether this is a more of a feedback or a contribution topic.
As I stumbled upon it while trying to build an addon to clean mocap data I decided to post this here.
The selection state of FCurves and Keyframes is really confusing.
The visibility and selection state of Keyframes and FCurves is depending on the selection/active state of its assigned bones, the active/selection state of their armature and blenders mode.
Some of these combinations lead to unexpected results:
1. FCurves are not shown when armature is not highlighted in outliner
When selecting bones via Box selection (in Pose Mode) I can select one or multiple bones without having an active bone.
When doing so the curves of the bones are shown in graph view but the left part with the names and settings for the fcurves is empty.
I need to actually highlight the armature in the outliner for the curve info to get shown.
When clicking on a single bone to set it active Blender automatically highlights the armature in the outliner and the curve info is visible.
Why is it even possible to show the curves without displaying the info and why is this dependent on the outliner highlight (selected?) state and not on the active armature?
2. Selecting Keyframes without selecting their FCurves
Some Graph View selection operators automatically select their corresponding FCurves (in the info panel on the left) like the Box selection but others do not.
For example using Column Selection the Keyframes get selected while the FCruves do not.
As for example selected_editable_keyframes
only returns keyframes of FCurves that are also selected this leads to a really confusing selection state.
If a user selects keyframes on a single curve and extends the selection to multiple curves view column selection before running an operator the User would expect the operator to run on all keyframes.
I could not find a way to access the selected Keyframes of an unselected FCurve in python.
My current workaround is to automatically select all visible FCurves before invoking my custom operator:
def execute(self, context):
for fcurve in context.visible_fcurves:
fcurve.select = True
Internal blender operator seem to get the selected Keyframes just fine though. As an example I can easily delete all selected Keyframes regardless of their FCurvesâ selection state.
Why do the FCurves even have an independent selection state?
I cannot think of a use case where you would want to select Keyframes without âselectingâ its FCurve.
And why does it change the content of selected_editable_keyframes
as the Keyframes are clearly selected and editable even when the FCruve isnt selected?
Thanks,
Pascal