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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2013-10-18 18:15:08 +0400
committerJoshua Leung <aligorith@gmail.com>2013-10-18 18:15:08 +0400
commita15818f1f7d3089d85d72a4196d0240d9f2f81d9 (patch)
tree6ace52238ba1683510c9f81258614ad44a2fa9af /source
parent38c16f9bf4b189227c2fa3805e1c570b35291116 (diff)
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
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/armature/pose_select.c14
1 files changed, 11 insertions, 3 deletions
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);
}
}