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:
authorJoshua Leung <aligorith@gmail.com>2014-02-21 15:51:37 +0400
committerJoshua Leung <aligorith@gmail.com>2014-02-21 15:53:03 +0400
commit4ff3ec835e321747880456e33cce261422bc05a7 (patch)
tree47c2220902baf0b205d46c2711f572dfd07e602c /source/blender/editors/animation/anim_channels_edit.c
parent3436c41dee284b0338674d07025bf47ddfc3bb10 (diff)
Fix T38737: Box select channels in dope sheet doesn't select corresponding bones in rig
Diffstat (limited to 'source/blender/editors/animation/anim_channels_edit.c')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index efd057d4e76..ee8b5dcee67 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -2121,6 +2121,32 @@ static void borderselect_anim_channels(bAnimContext *ac, rcti *rect, short selec
{
bActionGroup *agrp = (bActionGroup *)ale->data;
+ /* Armatures-Specific Feature:
+ * See mouse_anim_channels() -> ANIMTYPE_GROUP case for more details (T38737)
+ */
+ if ((ac->ads->filterflag & ADS_FILTER_ONLYSEL) == 0) {
+ if ((ale->id) && (GS(ale->id->name) == ID_OB)) {
+ Object *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...
+ */
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, agrp->name);
+
+ if (agrp->flag & AGRP_SELECTED) {
+ ED_pose_bone_select(ob, pchan, true);
+ }
+ else {
+ ED_pose_bone_select(ob, pchan, false);
+ }
+ }
+ }
+ }
+
/* always clear active flag after doing this */
agrp->flag &= ~AGRP_ACTIVE;
break;