[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43360] trunk/blender/source/blender/ editors/space_graph/graph_select.c: Fix #29879: ctrl+B border select with handles in the graph editor not selecting

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Jan 13 18:25:31 CET 2012


Revision: 43360
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43360
Author:   blendix
Date:     2012-01-13 17:25:24 +0000 (Fri, 13 Jan 2012)
Log Message:
-----------
Fix #29879: ctrl+B border select with handles in the graph editor not selecting
the right keys/handles.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_graph/graph_select.c

Modified: trunk/blender/source/blender/editors/space_graph/graph_select.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_select.c	2012-01-13 16:00:24 UTC (rev 43359)
+++ trunk/blender/source/blender/editors/space_graph/graph_select.c	2012-01-13 17:25:24 UTC (rev 43360)
@@ -201,7 +201,7 @@
 {
 	ListBase anim_data = {NULL, NULL};
 	bAnimListElem *ale;
-	int filter;
+	int filter, mapping_flag;
 	
 	SpaceIpo *sipo= (SpaceIpo *)ac->sl;
 	KeyframeEditData ked;
@@ -226,8 +226,12 @@
 	ked.data= &rectf;
 	
 	/* treat handles separately? */
-	if (incl_handles)
+	if (incl_handles) {
 		ked.iterflags |= KEYFRAME_ITER_INCL_HANDLES;
+		mapping_flag= 0;
+	}
+	else
+		mapping_flag= ANIM_UNITCONV_ONLYKEYS;
 	
 	/* loop over data, doing border select */
 	for (ale= anim_data.first; ale; ale= ale->next) {
@@ -235,7 +239,7 @@
 		FCurve *fcu= (FCurve *)ale->key_data;
 		
 		/* apply unit corrections */
-		ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYKEYS);
+		ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, mapping_flag);
 		
 		/* apply NLA mapping to all the keyframes, since it's easier than trying to
 		 * guess when a callback might use something different
@@ -274,7 +278,7 @@
 			ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, incl_handles==0);
 			
 		/* unapply unit corrections */
-		ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE|ANIM_UNITCONV_ONLYKEYS);
+		ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE|mapping_flag);
 	}
 	
 	/* cleanup */



More information about the Bf-blender-cvs mailing list