Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-10-13 15:43:19 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-10-15 15:04:14 +0300
commit78d1aa4d521cff25b07af2f6f8790d51b8b26064 (patch)
tree01d8030e7fcd962d7ce5f5639323cff3652f8ae6 /source/blender/editors/space_action/action_select.c
parent1ec1e36ac1d87c0404509204a332da797e8fc831 (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/space_action/action_select.c')
-rw-r--r--source/blender/editors/space_action/action_select.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index c49bac58474..ab5f1e0ab22 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -1730,7 +1730,7 @@ static int mouse_action_keys(bAnimContext *ac,
/* highlight channel clicked on */
if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET, ANIMCONT_TIMELINE)) {
/* deselect all other channels first */
- ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ ANIM_anim_channels_select_set(ac, ACHANNEL_SETFLAG_CLEAR);
/* Highlight Action-Group or F-Curve? */
if (ale != NULL && ale->data) {
@@ -1750,7 +1750,7 @@ static int mouse_action_keys(bAnimContext *ac,
}
else if (ac->datatype == ANIMCONT_GPENCIL) {
/* deselect all other channels first */
- ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ ANIM_anim_channels_select_set(ac, ACHANNEL_SETFLAG_CLEAR);
/* Highlight GPencil Layer */
if (ale != NULL && ale->data != NULL && ale->type == ANIMTYPE_GPLAYER) {
@@ -1768,7 +1768,7 @@ static int mouse_action_keys(bAnimContext *ac,
}
else if (ac->datatype == ANIMCONT_MASK) {
/* deselect all other channels first */
- ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ ANIM_anim_channels_select_set(ac, ACHANNEL_SETFLAG_CLEAR);
if (ale != NULL && ale->data != NULL && ale->type == ANIMTYPE_MASKLAYER) {
MaskLayer *masklay = ale->data;