From 24547931908990354da3f9be55377e3a168f1e67 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 22 Oct 2013 06:24:47 +0000 Subject: DopeSheet Group Select => Bone Select Tweak: Don't change selection status of bones if "Only Selected" dopesheet filter is enabled. When this was enabled, it would be too easy to accidentally change the selected bones, causing the keyframes you were just editing to disappear --- .../blender/editors/animation/anim_channels_edit.c | 31 +++++++++++++--------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'source') diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index a260bb3bd7e..de04a9f2379 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -2450,20 +2450,25 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in * Since groups are used to collect F-Curves of the same Bone by default * (via Keying Sets) so that they can be managed better, we try to make * things here easier for animators by mapping group selection to bone - * selection + * selection. + * + * Only do this if "Only Selected" dopesheet filter is not active, or else it + * becomes too unpredictable/tricky to manage */ - if ((ale->id) && (GS(ale->id->name) == ID_OB)) { - ob = (Object *)ale->id; - - if (ob->type == OB_ARMATURE) { - /* Assume for now that any group with corresponding name is what we want - * (i.e. for an armature whose location is animated, things would break - * if the user were to add a bone named "Location"). - * - * TODO: check the first F-Curve or so to be sure... - */ - pchan = BKE_pose_channel_find_name(ob->pose, agrp->name); - } + if ((ac->ads->filterflag & ADS_FILTER_ONLYSEL)==0) { + if ((ale->id) && (GS(ale->id->name) == ID_OB)) { + ob = (Object *)ale->id; + + if (ob->type == OB_ARMATURE) { + /* Assume for now that any group with corresponding name is what we want + * (i.e. for an armature whose location is animated, things would break + * if the user were to add a bone named "Location"). + * + * TODO: check the first F-Curve or so to be sure... + */ + pchan = BKE_pose_channel_find_name(ob->pose, agrp->name); + } + } } /* select/deselect group */ -- cgit v1.2.3