[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26108] trunk/blender/source/blender/ editors/space_graph/graph_select.c: Aligorith: please check.

Campbell Barton ideasman42 at gmail.com
Tue Jan 19 16:12:14 CET 2010


Revision: 26108
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26108
Author:   campbellbarton
Date:     2010-01-19 16:12:14 +0100 (Tue, 19 Jan 2010)

Log Message:
-----------
Aligorith: please check. this was copied from mouse select. however BKE_nla_tweakedit_remap(adt, rectf.xmin, NLATIME_CONVERT_UNMAP) is running which looks like it should be doing the remapping. however both functions are needed for this to work.
Committing since Lee wants border select to work in the graph editor but feel free to revert.

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	2010-01-19 14:04:33 UTC (rev 26107)
+++ trunk/blender/source/blender/editors/space_graph/graph_select.c	2010-01-19 15:12:14 UTC (rev 26108)
@@ -239,7 +239,10 @@
 	for (ale= anim_data.first; ale; ale= ale->next) {
 		AnimData *adt= ANIM_nla_mapping_get(ac, ale);
 		FCurve *fcu= (FCurve *)ale->key_data;
-		
+
+		if (adt)
+			ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+
 		/* set horizontal range (if applicable) */
 		if (mode != BEZT_OK_VALUERANGE) {
 			/* if channel is mapped in NLA, apply correction */
@@ -266,6 +269,10 @@
 		if (selectmode == SELECT_ADD) {
 			fcu->flag |= FCURVE_SELECTED;
 		}
+
+		/* un-apply NLA mapping from all the keyframes */
+		if (adt)
+			ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
 	}
 	
 	/* cleanup */





More information about the Bf-blender-cvs mailing list