From 654f6c4c4f7f59cb7fcc2d3bd78ea09a86fff644 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 18 Aug 2012 04:39:15 +0000 Subject: Bugfix [#32331] Graph editor zoom to selected includes coordinate origin if more than one curve is displayed The range calculation used to use a fixed 0-1 range whenever it couldn't find any values for a particular F-Curve. However, this was then taken by the aggregation calculation to be used as just another value, leading to problems if only vertices of a very high-value curve are selected to be included. Modified the range calculation to ensure that suitable vertices were found before trying to take the range values returned. --- source/blender/blenkernel/BKE_fcurve.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_fcurve.h') diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index ad1a63fd1e6..bf2f1262eee 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -217,8 +217,8 @@ void calc_fcurve_range(struct FCurve *fcu, float *min, float *max, const short do_sel_only, const short do_min_length); /* get the bounding-box extents for F-Curve */ -void calc_fcurve_bounds(struct FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, - const short do_sel_only, const short include_handles); +short calc_fcurve_bounds(struct FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, + const short do_sel_only, const short include_handles); /* .............. */ -- cgit v1.2.3