From a15818f1f7d3089d85d72a4196d0240d9f2f81d9 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 18 Oct 2013 14:15:08 +0000 Subject: Tweak for action group -> bone select feature Set newly selected bone as "active", so that the transform properties show the correct values for the newly selected bone --- source/blender/editors/armature/pose_select.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index bbdf94e56cf..a53d8050c5d 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -75,13 +75,18 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select) return; arm = ob->data; + /* can only change selection state if bone can be modified */ if (PBONE_SELECTABLE(arm, pchan->bone)) { - /* change selection state */ - if (select) + /* change selection state - activate too if selected */ + if (select) { pchan->bone->flag |= BONE_SELECTED; - else + arm->act_bone = pchan->bone; + } + else { pchan->bone->flag &= ~BONE_SELECTED; + arm->act_bone = NULL; + } // TODO: select and activate corresponding vgroup? @@ -91,6 +96,9 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select) if (arm->flag & ARM_HAS_VIZ_DEPS) { DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } + + /* send necessary notifiers */ + WM_main_add_notifier(NC_GEOM | ND_DATA, ob); } } -- cgit v1.2.3