"Clean Keyframes" in Dope Sheet only works if channels are selected #87160
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:
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.
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
I'm not sure if this is not the expected behavior, but the name is really confusing,
"Clean Channels" is behaving as if the name was
Delete Selected Channels.
Someone from the #animation_rigging team can better understand what's going on.
The difference between "Clean Channels" and "Delete Channels" is that "Clean" only deletes channels that contain no useful information (namely, channels whose keyframes all have the same value). In the example above, "Delete" deletes all the channels, but "Clean" leaves behind the "Z Location" channel. So in that sense, I wouldn't say "Clean Channels" is a bad name - at most, it could maybe be moved from the "Key" menu to the "Channel" menu, and be made to work with the selected channels rather than the selected keys.
I'll check it out. Seems like best solution is to be consistent with the GE. Selecting keyframes should select channels. This will also fix a paper cut with selected keyframes where it's not obvious which channels they're from.
I agree this is a papercut. I think the names "Clean Keyframes" and "Clean Channels" also doesn't help, because they're actually the same operator, but due to their names they sound (at least to me) like they would operate on different selections:
- "Clean Keyframes" sounds like it will operate on selected keys.
- "Clean Channels" sounds like it will operate on selected channels.
But in reality, they both operate on the selected channels, regardless of key frame selection. So I think better naming could also help here. E.g. "Clean Channel Keyframes" rather than "Clean Keyframes". Or something like that. And perhaps moving them both to the Channel menu...?
Things that are in a "keys" menu should work on keys, channels on channels, no matter the name.. having something that impacts the entire curve/channel vs limited to selection of keys is ripe for confusion, user mistake/data loss and or just thinking the tool doesn't do anything and never using it...telling people it doesn't work
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?