Commit: 4ff3ec835e321747880456e33cce261422bc05a7
Author: Joshua Leung
Date: Sat Feb 22 00:51:37 2014 +1300
https://developer.blender.org/rB4ff3ec835e321747880456e33cce261422bc05a7
Fix T38737: Box select channels in dope sheet doesn't select corresponding
bones in rig
===================================================================
M source/blender/editors/animation/anim_channels_edit.c
===================================================================
diff --git a/source/blender/editors/animation/anim_channels_edit.c
b/source/blender/editors/animation/anim_channels_edit.c
index efd057d..ee8b5dc 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;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs