[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60842] trunk/blender/source/blender/ editors/armature/pose_select.c: Tweak for action group -> bone select feature

Joshua Leung aligorith at gmail.com
Fri Oct 18 16:15:08 CEST 2013


Revision: 60842
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60842
Author:   aligorith
Date:     2013-10-18 14:15:08 +0000 (Fri, 18 Oct 2013)
Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/blender/editors/armature/pose_select.c

Modified: trunk/blender/source/blender/editors/armature/pose_select.c
===================================================================
--- trunk/blender/source/blender/editors/armature/pose_select.c	2013-10-18 10:43:54 UTC (rev 60841)
+++ trunk/blender/source/blender/editors/armature/pose_select.c	2013-10-18 14:15:08 UTC (rev 60842)
@@ -75,13 +75,18 @@
 		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 @@
 		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);
 	}
 }
 




More information about the Bf-blender-cvs mailing list