Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: Radeon RX 580 Series ATI Technologies Inc. 4.5.13596 Core Profile Context 20.10.35.02 27.20.1034.6
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-04-02 21:26, hash: rB321eef6a0c0f
Short description of error
The "Clean Keyframes" and "Clean Channels" operators in the Dope Sheet editor only work if the channels containing the selected keyframes are also selected. This is unlike the "Delete Keyframes" operator, which works even if the channels are not selected.
Exact steps for others to reproduce the error
- Load the default startup scene.
- Enable Auto Keying in the Timeline editor.
- Move the cube up a bit.
- Seek the playhead to another frame and move the cube up a bit more.
- Switch to the Animation workspace.
- In the Dope Sheet editor, click in an empty space of the keyframe region to deselect all keyframes and channels.
- Expand the "Object Transforms" channel group and, with the mouse cursor in the keyframe region, press A to select all keyframes (but not the channels).
- Press X and select "Delete Keyframes." All keyframes and channels are deleted as expected. Press Ctrl-Z to revert.
- Press X again, but this time select "Clean Keyframes." Nothing happens despite there being plenty of keyframes to clean.
- Move the mouse cursor to the channel region and press A to select all channels.
- Move the mouse cursor back to the keyframe region and run "Clean Keyframes" again. This time, the cleanup works as expected.
The "Clean Channels" operator behaves in the same way.
The reason this only happens in the Dope Sheet editor and not the Graph Editor is likely that the Graph Editor automatically selects the channels for the selected keyframes, but the Dope Sheet editor does not. (It's not limited to "Select All", either; if you box-select keyframes from multiple channels, the same difference is observed.)
So rather than making "Clean Keyframes" and "Clean Channels" independent of channel selection, the real fix might be to automatically select the relevant channels in the Dope Sheet editor too.
Apart from this, it might make sense to move the "Clean Channels" operator to the "Channel" menu (and the "X" button of the channel region) and make it depend on channel selection *only* - that is, clean all keyframes of the selected channels, even if there are no keyframes selected. That way, there'd be some nice symmetry between the "Channel" and "Key" menus, both having their own "Delete" and "Clean" operators.