diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-02-22 07:13:29 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-02-22 07:13:29 +0300 |
commit | 874f8008a2c179859e6786d6ea210cad2b0cb416 (patch) | |
tree | 7f7b11fb5f785e257540a59d44b514414b27bd30 /source/blender/editors/space_action | |
parent | f2f734c9a5668e370253ff550de9a240bb142466 (diff) |
Animation Editors: Bugfixes for channel selection tools
* Ctrl-Shift select for Action Groups works again
* Clicking on a channel's data will select it, and also make it the active one in the list now
* Selecting keyframes in F-Curves will select the F-Curve channel too now (+ make it active)
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r-- | source/blender/editors/space_action/action_select.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 311ac8ec6b4..5cf92abb664 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -839,13 +839,20 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short selectmode) deselect_action_keys(ac, 0, SELECT_SUBTRACT); if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET)) { + int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS); /* this should suffice for now */ + + /* deselect all other channels first */ ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); - /* Highlight Action-Group? */ + /* Highlight Action-Group or F-Curve? */ if (agrp) { agrp->flag |= AGRP_SELECTED; - ANIM_action_set_active_channel(ac->data, ac->datatype, agrp, ANIMTYPE_GROUP); + ANIM_set_active_channel(ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP); } + else if (fcu) { + fcu->flag |= FCURVE_SELECTED; + ANIM_set_active_channel(ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE); + } } else if (ac->datatype == ANIMCONT_GPENCIL) { ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); |