diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-10-13 15:43:19 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-10-15 15:04:14 +0300 |
commit | 78d1aa4d521cff25b07af2f6f8790d51b8b26064 (patch) | |
tree | 01d8030e7fcd962d7ce5f5639323cff3652f8ae6 /source/blender/editors/include | |
parent | 1ec1e36ac1d87c0404509204a332da797e8fc831 (diff) |
Cleanup: Animation, simplify channel selection code
Split up `ANIM_deselect_anim_channels()` into
`ANIM_anim_channels_select_set()` and
`ANIM_anim_channels_select_toggle()`.
`ANIM_anim_channels_select_set()` is equivalent to the old
`ANIM_deselect_anim_channels(..., false, ACHANNEL_SETFLAG_xxx)`.
`ANIM_anim_channels_select_toggle()` is equivalent to the old
`ANIM_deselect_anim_channels(..., true, ACHANNEL_SETFLAG_ADD)`.
`ANIM_deselect_anim_channels(..., true, ACHANNEL_SETFLAG_CLEAR)` was
also called once. The `true` parameter suggested the "toggle" behaviour
was intended, but the `ACHANNEL_SETFLAG_CLEAR` argument prevented any
toggling. This is now replaced with `ANIM_anim_channels_select_set(ac,
ACHANNEL_SETFLAG_CLEAR)` to make this explicit.
No functional changes, just a cleanup in order to better understand how
the selection works.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 04f6932d671..9cf67816df2 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -620,9 +620,11 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode); -/* Deselect all animation channels */ -void ANIM_deselect_anim_channels( - bAnimContext *ac, void *data, eAnimCont_Types datatype, bool test, eAnimChannels_SetFlag sel); +/* Select or deselect animation channels */ +void ANIM_anim_channels_select_set(bAnimContext *ac, eAnimChannels_SetFlag sel); + +/* Toggle selection of animation channels */ +void ANIM_anim_channels_select_toggle(bAnimContext *ac); /* Set the 'active' channel of type channel_type, in the given action */ void ANIM_set_active_channel(bAnimContext *ac, |