[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18923] branches/blender2.5/blender/source /blender/editors/armature/editarmature.c: just a small commit with some fixes/clean ups for my previous commit

Michael Fox mfoxdogg at gmail.com
Wed Feb 11 10:12:49 CET 2009


Revision: 18923
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18923
Author:   mfoxdogg
Date:     2009-02-11 10:12:43 +0100 (Wed, 11 Feb 2009)

Log Message:
-----------
just a small commit with some fixes/clean ups for my previous commit

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/armature/editarmature.c

Modified: branches/blender2.5/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/armature/editarmature.c	2009-02-11 09:06:00 UTC (rev 18922)
+++ branches/blender2.5/blender/source/blender/editors/armature/editarmature.c	2009-02-11 09:12:43 UTC (rev 18923)
@@ -3520,13 +3520,7 @@
 
 	/*	Determine if there are any selected bones
 	And therefore whether we are selecting or deselecting */
-	CTX_DATA_BEGIN(C, EditBone *, selbone, selected_editable_bones) {
-		if (selbone->flag & (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL)){
-			sel=0;
-			break;
-		}
-	}
-	CTX_DATA_END;
+	if (CTX_DATA_COUNT(C, selected_bones) > 0)	sel=0;
 	
 	/*	Set the flags */
 	for (ebone=arm->edbo->first;ebone;ebone=ebone->next) {
@@ -3545,7 +3539,7 @@
 	}	
 	
 	/* undo? */
-	WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+	WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL);
 	
 	return OPERATOR_FINISHED;
 }
@@ -4397,11 +4391,7 @@
 
 	/*	Determine if there are any selected bones
 	And therefore whether we are selecting or deselecting */
-	CTX_DATA_BEGIN(C, bPoseChannel *, selbone, selected_pchans) {
-		sel=0;
-		break;
-	}
-	CTX_DATA_END;
+	if (CTX_DATA_COUNT(C, selected_pchans) > 0)	sel=0;
 	
 	/*	Set the flags */
 	for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
@@ -4411,7 +4401,7 @@
 		}
 	}	
 
-	WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+	WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL);
 	
 	return OPERATOR_FINISHED;
 }





More information about the Bf-blender-cvs mailing list